Forum
Add html tag to nav menu item
I am using a jquery drop-down nav menu as part of a page template. In order to use a Font Awesome icon indicating the drop-down status, the code calls for the addition of an <i class="fa fa-angle-down"></i> tag to the top-level list item eith the sub-menu, following the menu href.
Essentially, I need to go from...
<ul>
<li>
<a href="/test.php">Test</a>
</li>
<li class="ancestor">
<a href="#">test2222</a>
<ul>
<li>
... to...
<ul>
<li>
<a href="/test.php">Test</a>
</li>
<li class="ancestor">
<a href="#">test2222 <i class="fa fa-angle-down"></i></a>
<ul>
<li>
... for specific top level pages.
Is there a way of achieving this?
Part solution might be
This works when looking at sub-pages of that top level item, but not for other top-level pages.
If I add in a similar statement for where subitems exist, it works well enough until viewing the nav from one of the subitems, where it obviously outputs the icon twice.
And finally... the solution.
Sorry about that. It's 1am here and I'm tired... or at least that's my excuse!
Thank you for a fantastic navigation template system.