{% for oNode in aNodes %} {% if oNode.tagName and oNode.tagName != 'BTN' %} {% set id = oNode.getAttribute('id') %} {% if isset( aRights[id] ) %} {% set idx = aRights[id] %} {% else %} {% set idx = 2 %} {% endif %} {% if oNode.hasAttribute('idx') and oNode.getAttribute('idx') < idx %} {% set idx = oNode.getAttribute('idx') %} {% elseif iParentIdx < idx %} {% set idx = iParentIdx %} {% endif %} {% endif %} {% endfor %}