Hey, Right now, there is no way you can get level of nav tree. so you cant get current level. (Nice feature to add. I will add it in next realease)
For your case, You have 3 level menu where I guess, First level is main nav, second level is heading under megamenu and 3rd level is actual links.
You can identify level with condition like this:
{if parent_id == 0} <!-- I am on root level (level 1) --> {if:elseif has_children} <!-- this is 2nd level --> {if:else} <!-- this is 3rd level --> {/if}
For 2nd question, You dont have new html in {nav:child:render}, Main tagdata cloned here. So for given example, item marked in red box will be cloned again for child nav. https://prnt.sc/126qfce
That’s why you can use above conditions to manipulate data by level.
Let me know if you have any queries.
Thanks,
Mufi
[Amici Infotech Support]
|