Closed ghost closed 9 years ago
I am having trouble getting the custom node class to work.
I have added a custom node class to a menu item via the CP. However, it does NOT show up on the menu. Here is the code that I am using:
{% set nav = craft.amNav.getNavRaw("top_header") %} {% macro addNodeToNavigation(node) %} <li{% if node.active %} class="current"{% endif %}> <a href="{{ node.url }}" title="{{ node.name }}"><div>{{ node.name }}</div></a> {% if node.hasChildren %} <ul> {% for subnode in node.children %} {{ _self.addNodeToNavigation(subnode) }} {% endfor %} </ul> {% endif %} </li> {% endmacro %} <ul> {% for node in nav %} {{ _self.addNodeToNavigation(node) }} {% endfor %} </ul>
Any idea why it is not working?
Thanks,
Moshe
Sorry for the late reply.
Please see the updated readme.
I am having trouble getting the custom node class to work.
I have added a custom node class to a menu item via the CP. However, it does NOT show up on the menu. Here is the code that I am using:
Any idea why it is not working?
Thanks,
Moshe