Nice(er) URL's

Author Message

Jakub Derdziak

Thursday 25 November 2010 5:29:40 am

Hi Everyone!

I wander, how to make url shorters, by cutting all tree structure from them. For example if we have

site.com/path/to/article

I want to get:

site.com/article

Is it possible in eZPublish.

Thanks

Jurica Perić

Thursday 25 November 2010 6:45:58 am

You can create URL Alias that will point to that article. But that action isn't automatic for all published content and you have to do it manually. You can do that under Setup -> URL Translator or URL Wildcard

Gaetano Giunta

Thursday 25 November 2010 1:25:10 pm

Url wildacrd would make a lot of sense. Or add a secondary location to your articles as children of the root node. IIRC there is an extension with a workflow event that can automate the 'add secondary location' part, on projects.ez.no

Principal Consultant International Business
Member of the Community Project Board

Jakub Derdziak

Thursday 25 November 2010 10:45:27 pm

Thanks for the answer. I was hoping that something like this is eZPublish setting. Problem with Wildcard is that I hevce thousends of articles on site. And adding location cause Breadcrump pointless.But thanks again.

Igor Vrdoljak

Thursday 25 November 2010 10:59:35 pm

You can also check PathPrefix setting in site.ini: http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/SiteAccessSettings/PathPrefix

It adds a specified prefix to virtual URL entered by user. It is commonly used to remove parts of the generated URLs when a particular siteaccess is located under subtree in content structure, but maybe it can be useful to you.

http://www.netgen.hr/eng
http://twitter.com/ivrdoljak

Bertrand Dunogier

Thursday 25 November 2010 11:33:55 pm

Depending on your site structure, I find it a little risky to make an alias straight from root level to subfolders. It would be quite easy to end up facing conflicts. What about something like /a/<article> ? It would remain really readable.

You could indeed use redirecting URL wildcards for this, it would work quite well. Are all your articles located in the same subfolder ?

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 29 2025 23:51:53
Script start
Timing: Jan 29 2025 23:51:53
Module start 'layout'
Timing: Jan 29 2025 23:51:53
Module start 'content'
Timing: Jan 29 2025 23:51:54
Module end 'content'
Timing: Jan 29 2025 23:51:54
Script end

Main resources:

Total runtime0.9954 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.0000151.1953
Module start 'layout' 0.00560.0039 739.195336.6094
Module start 'content' 0.00950.9850 775.8047627.3125
Module end 'content' 0.99450.0009 1,403.117215.8906
Script end 0.9953  1,419.0078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3066160.0002
Check MTime0.00120.1208160.0001
Mysql Total
Database connection0.00070.066410.0007
Mysqli_queries0.935093.9370730.0128
Looping result0.00070.0710710.0000
Template Total0.943794.820.4718
Template load0.00180.183520.0009
Template processing0.941894.619920.4709
Template load and register function0.00030.026510.0003
states
state_id_array0.00150.151110.0015
state_identifier_array0.00110.109020.0005
Override
Cache load0.00160.1579260.0001
Sytem overhead
Fetch class attribute can translate value0.00070.074950.0001
Fetch class attribute name0.00090.095390.0001
XML
Image XML parsing0.00160.163850.0003
class_abstraction
Instantiating content class attribute0.00000.001690.0000
General
dbfile0.01771.7759280.0006
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
6content/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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs