Forums / Install & configuration / Object name pattern & friendly URL's

Object name pattern & friendly URL's

Author Message

Maarten Holland

Tuesday 23 January 2007 11:55:38 am

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

Kristof Coomans

Wednesday 24 January 2007 10:29:35 am

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/install_configuration/is_it_possible_to_browse_by_node_id

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Maarten Holland

Thursday 08 February 2007 1: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

Maarten Holland

Wednesday 28 February 2007 1: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

Xavier Dutoit

Wednesday 28 February 2007 11:53:29 pm

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+

http://www.sydesy.com

eZ debug

Timing: Jan 20 2025 00:22:38
Script start
Timing: Jan 20 2025 00:22:38
Module start 'content'
Timing: Jan 20 2025 00:22:39
Module end 'content'
Timing: Jan 20 2025 00:22:39
Script end

Main resources:

Total runtime1.0678 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 589.0781180.8203
Module start 'content' 0.00490.9475 769.8984601.6016
Module end 'content' 0.95240.1154 1,371.5000337.3750
Script end 1.0678  1,708.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3415210.0002
Check MTime0.00130.1250210.0001
Mysql Total
Database connection0.00060.055110.0006
Mysqli_queries0.999593.60592020.0049
Looping result0.00170.16172000.0000
Template Total1.042997.720.5214
Template load0.00210.199920.0011
Template processing1.040797.462120.5204
Template load and register function0.00010.011910.0001
states
state_id_array0.00110.106110.0011
state_identifier_array0.00120.115920.0006
Override
Cache load0.00180.1721380.0000
Sytem overhead
Fetch class attribute can translate value0.00110.104140.0003
Fetch class attribute name0.00090.086970.0001
XML
Image XML parsing0.00130.123340.0003
class_abstraction
Instantiating content class attribute0.00000.001070.0000
General
dbfile0.00560.5289330.0002
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs