Current link

Author Message

Alexander Petrov

Tuesday 04 September 2007 7:03:46 am

I'm trying to code the "current link" template inside the User class. It has child elements in my installation and inside every user there are elements like folders and articles. I want to create a navigation for this.

In my pagelayout template I use this code for detecting the current link :

{let selected=and( count( $module_result.path )|gt(1), eq( $module_result.path[1].node_id, $child.node_id ) )}
<a href={$child.url_alias|ezurl()} title="{$child.name|wash()}" {$selected|choose( '', 'id="current"' )}>{$child.name|wash()}</a>
			{/let}

It works perfectly for main navigation.

But when I put this code inside the folder class I'v created inside Users class group the "current link" does not detects. Can anyone help me with it?!

Thanx!

Alexander Petrov

Tuesday 04 September 2007 12:05:38 pm

Found solution:

<a href={$child.url_alias|ezurl()} title="{$child.name|wash()}" {if $node.node_id|eq( $child.node_id)}id="current"{/if}>{$child.name|wash()}</a>

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