url alias problem with main_node_id

Author Message

bisk

Wednesday 19 May 2004 3:33:47 am

I have some related object's which url's get build with this code:

<a href={concat( '/content/view/full/', $object.main_node_id )|ezurl}>

Now I'm trying to change it to friendly urls with url_alias and ezroot, but how do i change the main_node_id into a working url alias?

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

akiL Mussa

Wednesday 19 May 2004 4:00:26 am

try this:

<a href={$node.url_alias|ezurl}>

bisk

Wednesday 19 May 2004 4:19:12 am

thanks for your reply, but that doesn't work. It just ends up with an empty <a href="">.

I don't have any problems with getting friendly url's to work in general, just only with these related objects.

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Patrick Woods

Wednesday 19 May 2004 6:39:12 am

The only way I was able to do get the main_node_id url_alias was to fetch the main_node, which seems like redundant work.

Maybe its the way I have things setup. I have a News folder that gets fetched as my home page. I add that location to anything that I want to appear as news but I want it to display the main location as the location of the node. I fetch the main_node information and use that.

Seems silly to have to do two fetches, but it seems that the only main_node information that is passed with the current node is the id.

--
www.hakjoon.com

bisk

Wednesday 19 May 2004 7:47:56 am

thanks, i've figured it out:

<a href={$object.main_node.url_alias|ezroot}>

that works :)

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

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