[%- USE T8 %]
[%- USE L %]
[%- USE HTML %]
[%- USE LxERP -%]
[%- SET main_id = '100' %]
[%- FOREACH node = menu.tree %]
[%- NEXT UNLESS node.visible %]
[%- SET main_id = main_id + 1 %]
-
[% L.link(menu.href_for_node(node) || '#', menu.name_for_node(node), target=node.target) %]
[%- IF node.children %]
[%- SET sub1_id = main_id * 100 %]
[%- FOREACH sub1node = node.children %]
[%- NEXT UNLESS sub1node.visible %]
[%- SET sub1_id = sub1_id + 1 %]
-
[% L.link(menu.href_for_node(sub1node) || '#', menu.name_for_node(sub1node), target=sub1node.target) %]
[%- IF sub1node.children %]
[%- SET sub2_id = sub1_id * 100 %]
[%- FOREACH sub2node = sub1node.children %]
[%- NEXT UNLESS sub2node.visible %]
[%- SET sub2_id = sub2_id + 1 %]
-
[% L.link(menu.href_for_node(sub2node) || '#', menu.name_for_node(sub2node), target=sub2node.target) %]
[%- END %]
[%- END %]
[%- END %]
[%- END %]
[%- END %]