Forums / Setup & design / Current link

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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>