This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Get current item in a menu

Get current item in a menu

Get current item in a menu

Wednesday 13 November 2013 4:41:53 pm - 1 reply

Hi All,
I remember in eZ Publish 4, we can define our current item (for example in a menu) with a {$node.path_array.xx} and compare this with current content :

 {foreach $items as $item}
{if eq($item.path_array.xx, $node.path_array.xx)}
This is my current item
This is not my current item

Well, now, in eZ Publish 5, I'm pretty sure we can use a similar method but, I don't found any documentation or similar cases in this forum :

{% for location in locationList %}
           <li class="nav-location-{{ }}">
                 <a href="{{ path( location ) }}" title="{{ }}">
                        {{ }}
{% endfor %}

The only data that I miss is the global variable (like $node in eZ Publish4) to compare this with my

Can you help me ?


Thursday 14 November 2013 3:05:20 pm


i think you search for the ezpublish helper :

 {{ dump(ezpublish.systemUriString) }}


will help u.


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from