Class for items with no children
waswebb opened this issue · comments
waswebb commented
Hi
I use your plugin for a project in witch i should have the option to give a li
tag with no children a class like no-children
. Like the included class has-children
.
That would be great if you can help me.
Hubert Prein commented
You'd be able to do this with the getNavRaw
sample: https://github.com/am-impact/amnav#build-the-way-you-like-it
{%- if node.hasChildren -%}
{%- set nodeClasses = nodeClasses|merge(['has-children']) -%}
{% else }
{%- set nodeClasses = nodeClasses|merge(['no-children']) -%}
{%- endif -%}