Forums / Setup & design / Nice URL Delimiter: Change _ to -

Nice URL Delimiter: Change _ to -

Author Message

Alex Jones

Wednesday 10 September 2003 3:28:32 pm

Is it possible to change the use of underscores to dashes in nice URLs?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Gunnstein Lye

Thursday 11 September 2003 4:14:07 am

There is no config option for this. You must do a change in kernel/classes/ezcontentobjecttreenode.php. In the pathWithNames() function you will find two preg_replace expressions. Change underscore to - in the second array argument in both preg_replace calls. Then rerun update/common/scripts/updateniceurls.php.

Alex Jones

Friday 12 September 2003 6:59:44 am

Thanks Gunnstein!

I'm not sure if I want to make the change badly enough to tinker with code that may be overwrittein in future upgrades. I have to keep track of enough changes as it is. :) It would be nice if future versions of eZ publish provided this as a setting during setup or within the site.ini as the URLs delimiters can have a direct impact on search engine ranking.

Thanks again,

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Mark Marsiglio

Tuesday 03 April 2007 10:43:10 am

Has anyone been able to find where this moved to in the 3.7, 3.8 or 3.9 versions? It is no longer in the ezcontentobjecttreenode.php that I can see.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Kristof Coomans

Tuesday 03 April 2007 11:22:54 am

Hi Mark

It is converted by eZ's transliteration system ( http://ezpedia.org/wiki/en/ez/transliteration ), in eZURLAlias::convertToAlias. The different commands are listed in transform.ini. The one you're looking for is url_cleanup. At the end, you'll have to look at the top of eZCodeMapper::generateCommandCode and eZCodeMapper::executeCommandCode, where preg_replace is transforming your url.

Good luck!

<b>Edit:</b> apparently this question has been answered before: http://ez.no/community/forum/general/transformation_url_transliteration. I did make a nice trip however through the kernel and lib to find it out :-)

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

Nabil Alimi

Tuesday 03 April 2007 1:53:54 pm

And it seems that is has been done already : http://www.premiere.fr/premiere/cinema

(Not by us :)

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Damien Pitard

Monday 02 July 2007 3:46:59 pm

"This feature will be part of up-coming eZ Publish 3.10 release. User can define whatever separator want in url alias." by Lukasz Serwatka

seen on http://issues.ez.no/IssueView.php?Id=11063&activeItem=1

Damien Pitard | Prisma Presse

Robert G.

Sunday 23 December 2007 11:07:38 am

Hi,

i use ezpublish 3.9.4 and i have appplied the patch for dashed url ... now how can I update all existing objects? Launching /bin/php/updateniceurls.php url are not updated .

Thx

eZ debug

Timing: Jan 18 2025 11:09:50
Script start
Timing: Jan 18 2025 11:09:50
Module start 'content'
Timing: Jan 18 2025 11:09:50
Module end 'content'
Timing: Jan 18 2025 11:09:50
Script end

Main resources:

Total runtime0.1466 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 589.1563180.8359
Module start 'content' 0.00720.0066 769.9922101.7891
Module end 'content' 0.01380.1327 871.7813529.7031
Script end 0.1466  1,401.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00402.6953200.0002
Check MTime0.00181.1955200.0001
Mysql Total
Database connection0.00060.429710.0006
Mysqli_queries0.100768.67361410.0007
Looping result0.00120.84981390.0000
Template Total0.132390.210.1323
Template load0.00090.589010.0009
Template processing0.131589.643510.1315
Override
Cache load0.00060.419310.0006
Sytem overhead
Fetch class attribute can translate value0.00070.501910.0007
XML
Image XML parsing0.00030.184910.0003
General
dbfile0.00473.2037200.0002
String conversion0.00000.004130.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs