eZ Community » Forums » Install & configuration » Object name pattern & friendly URL's
expandshrink

Object name pattern & friendly URL's

Object name pattern & friendly URL's

Tuesday 23 January 2007 8:55:38 pm - 4 replies

Hi all,

I like my URL's short and simple. Preferably each object should have a one word identifier to use in the URL. Like ez.no/products/ezpublish.

But, the title of the object could be longer. The title above ez.no/products/ezpublish for instance, could be 'ezPublish Content Management System' instead of just 'ezPublish'.

I tried this by using...

Name: 'ezPublish Content Management System'
Short name: 'ezPublish'

...in my content objects, but now the title above this page and embedded references to this page now only state 'ezPublish' instead of 'ezPublish Content Management System'.

Is there a way I can have just 'ezpublish' in the URL but 'ezPublish Content Management System' in all pages without having to change all referenced templates?

I hope anyone can help me!

Thanks in advance,

Maarten

Wednesday 24 January 2007 7:29:35 pm

Hi Maarten

I made a patch which adds a second naming pattern to content classes, which is used for the url aliases (instead of the object name pattern). Also see this topic: http://ez.no/community/forum/inst.../is_it_possible_to_browse_by_node_id

Thursday 08 February 2007 10:35:42 pm

Hi Kristof,

Your patch seems to be exactly what I needed!

I just installed it and did a few small tests. It seems to work perfectly and is exactly what I was looking for. ez Systems should add this to the default functionality of ez Publish.

Thanks a lot for sharing it and pointing it out to me!

Cheers,

Maarten

Wednesday 28 February 2007 10:23:15 pm

Hi Kristof,

Perhaps you can help me out once again.

I'd like to use a datetime for the URL of weblog entries. This is working, but the URL's are automatically formatted like monday_august_13_2006_08_23_00_pm and it seems this can't be overriden manually.

Could you think of a way I could choose the format for the date and time in the URL to achieve a more desirable short format like 20060823-8-23PM or perhaps 2006-08-23-8-23-PM?

Cheers!

Maarten

Thursday 01 March 2007 8:53:29 am

Modify the date datatype that's the method title in kernel/classes/datatypes/ezdatetime/ezdatetimetype.php (if you use the datetime

I'd suggest to put the format option in a .ini (eg TitleFormat = YYYY-MM-DD) and use it in the code.

Then submit it as a enhancement and hope ez picks it up, so everyone benefit from it and you won't have to patch by hand everytime.

X+

expandshrink

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

36 542 Users on board!

Forums menu