Translating url inside a template [easy]

Author Message

Clemens T

Thursday 10 February 2005 5:22:44 am

Hey all,
I'm currently editing my first template, and I can't seem to find how to get the url of the article in a subfolder. The name of the article is:

Hello World (for example)

the friendly url would then be:
http://.../index.php/mysite/myfolder/hello_world/
--> and this url works...
but until now the closest I got is:
http://.../index.php/mysite/Hello%20World/

How can I give a list in myfolder that creates these urls? (I know how to loop all the articles etc, but it's just the 'url' attribute I can't get to work like I want to).

I've been looking at $:item.name etc, and $:item.object.data_map.url_alias.contents ... but they both don't create the friendly urls as illustrated above.

Thanks a load,
Clemens Timmermans

Mikhail Chekanov

Thursday 10 February 2005 5:29:01 am

<a href={$:item.url_alias|ezurl} title={$:item.name}>link</a>

--
mike
#6595551

Clemens T

Thursday 10 February 2005 5:43:37 am

Thanks.. you rock!

I should have seen that coming... but I didn't so.. thanks!

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 18 2025 20:53:07
Script start
Timing: Jan 18 2025 20:53:07
Module start 'layout'
Timing: Jan 18 2025 20:53:07
Module start 'content'
Timing: Jan 18 2025 20:53:08
Module end 'content'
Timing: Jan 18 2025 20:53:08
Script end

Main resources:

Total runtime0.6069 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.0313152.6406
Module start 'layout' 0.00460.0025 740.671939.4609
Module start 'content' 0.00710.5985 780.1328496.5156
Module end 'content' 0.60550.0013 1,276.64848.1406
Script end 0.6068  1,284.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.5061160.0002
Check MTime0.00130.2096160.0001
Mysql Total
Database connection0.00060.105310.0006
Mysqli_queries0.563292.7976570.0099
Looping result0.00050.0776550.0000
Template Total0.579095.420.2895
Template load0.00200.333220.0010
Template processing0.576995.064820.2885
Template load and register function0.00010.023910.0001
states
state_id_array0.00090.153610.0009
state_identifier_array0.00080.125420.0004
Override
Cache load0.00170.2756200.0001
Sytem overhead
Fetch class attribute can translate value0.00070.123220.0004
Fetch class attribute name0.00090.143930.0003
XML
Image XML parsing0.00030.046320.0001
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00280.4545100.0003
String conversion0.00000.000840.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs