[Typo3-dev] Speaking URIs

Martin Poelstra martin at beryllium.net
Fri Jan 16 11:47:55 CET 2004


Hi Dominic,

> great to hear about the forthcoming of speakingURIs!
> will the new extension also rewrite URIs created by any extension?

Bad news this time: not yet.
It is on my ToDo, but I haven't really thought about a good solution. I
was planning to implement support for the MD5 and Base64-encoded-way
that's already offered by Typo as a start, but as I don't like ID's in
my URLs, I certainly don't like all these other things in my URLs too,
so I'm still going to think of a better way :)

The problem is, that I think that it's going to involve changes in the
extensions that would like to use it:

In my view, there are two types of arguments: static and dynamic ones.
The dynamic ones are e.g. the words you are searching for, or how many
results you would like to see on a page. These should still be passed on
as ?foo=bar in the URL, as you probably don't want them to be indexed by
Google anyway.
The static ones are e.g. the id's of articles, or posts on the forum.
These don't really change and could be included in the URL like a normal
path.

This would then look something like:
www.domain.com/product1/support/forum/thread123/post456/

This would mean that the RealURLs-extension has to know that it should
only parse the URL until .../forum/, and pass the rest to lz_phpbb (or
even translate it for it and then pass it).

The other way around: when e.g. lz_phpbb wants to link to an article, it
would be the most easy way if it just passes some variables to RealURL
(well, actually the to-be-created URL-API of Typo3), which will then
generate the URL shown above.
Another (more compatible) way would be to let RealURL translate some
'well-known' arguments itself, so the URL
http://www.kommwiss.fu-berlin.de/index.php?id=74&backPID=1&tt_news=50
would automagically become something like
http://www.kommwiss.fu-berlin.de/news/backPID_1/tt_news_50

I really don't like the latter approach, because it is very slow and
very ugly, but it might remove the need to adapt existing extensions.

Actually, I haven't really looked at the way this kind of URLs is
currently being generated. Are they mostly generated by some sort of API
of the extension-base-class (what's it called again?) or are they often
hard-coded like $content .= $this->getLinkToSelf() . '&arg1='.$arg1; ?

Grtz,
Martin






More information about the TYPO3-dev mailing list