eZ Community » Forums » Developer » Overriding URL aliases
expandshrink

Overriding URL aliases

Overriding URL aliases

Tuesday 21 November 2006 11:35:53 am

I'm playing a bit with url aliases. I have a bit of a problem, is there a way to override the default behaviour? Here's what I'm trying to acheive, and I think you should conisder having this option in the future, it can be very helpful.

Let's assume I create a new article, by default I get a URL similiar to this:
http://example.com/section/iraq_under_war

I want to have a different URL, as follows:
http://example.com/section/456-iraq_under_war

The only thing I added is the node id before the clean URL. There are many benefits to this, which I'm sure you know. Now the lookup for the article should happen on the ID only, anything that comes after it is ignored. This way I don't need to store any aliases in the database, and lookups can happen much faster. If the clean URL changed, I wouldn't have any problem, and there's no need to store the old alias...etc.

I had a chat with Bard, and he mentioned that I should do a bit of hacking to the code to acheive this as currently there is no way to do this cleanly in eZ.

Where should I start hacking? Any help is appreciated

Modified on Tuesday 21 November 2006 11:36:39 am by Ammar Ibrahim

No reply yet!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from