Forums / Developer / Translating url inside a template [easy]

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!