Forums / Developer / Trouble with navigation
John Petrello
Friday 07 January 2011 2:48:09 pm
To start off, I am totally new to eZPublish and am just using it because a client is requesting changes to their homepage.
Here is the code I have thus far:
<li>{def $womens = fetch('content', 'node', hash('node_id', 10459))}<a href="{$womens.object.url_alias|ezurl}">Womens</a></li>
Basically, I am just trying to get the path to a certain node, which in this case is the Womens clothing section of a site. I have the URL alias field filled out for that node, but I cant seem to retrieve it. Does everything look alright?
Thanks!
Edi Modrić
Friday 07 January 2011 3:44:08 pm
Hi Jonh,
your <a> tag should look like this:
<a href={$womens.url_alias|ezurl}>Womens</a></li>
That is, no quotes as ezurl operator generates them, and no "object" because url_alias property exists on node, not object.
eZ Publish certified developer http://ez.no/certification/verify/350658