Page 1 of 1

why does serendipity use id-title.html style tags?

Posted: Thu Aug 18, 2005 5:13 pm
by Dinges
why does serendipity use id-title.html style tags?

It seems to use both of the params to find the article, but why, you could use either id or name to find the article :lol:

Re: why does serendipity use id-title.html style tags?

Posted: Thu Aug 18, 2005 6:34 pm
by garvinhicking
The id is used for DB lookup. We then know the right entry id, and this saves one additional database lookup for matching a link to an entry. So if a id is present in the URL, Serendipity disregards any title information.

The title is used in the URL for prettyness and readablity and backward-compatibility.

Regards,
Garvin

Posted: Thu Aug 18, 2005 9:53 pm
by Dinges
but if the title is incorrect, it will not fetch the entry :cry:

Is it possible to remove that id?

Posted: Fri Aug 19, 2005 1:13 pm
by garvinhicking
I don't understand you - if you have the ID in the URL, the title doesn'T matter.

http://blog/archives/5-ignore.html and
http://blog/archives/5-this-is-another-title.html

will both show entry 5. Only if you omit the 5 in the URL and would use a permalink pattern without %id% it would match the title and then

http://blog/archives/ignore.html and
http://blog/archives/ignore-.html

would not yield the same result.

If that is not what you asked, please try to explain it more detailed. :)

Regards,
Garvin