Forum
Dropdown displaying parent page as first link
Hello! We want to create a dropdown. We have a parent page called "Fireplaces". When the user hovers over this top level link, we want the dropdown to display all of our products. This currently works, but inside the dropdown, it is also including the parent page "Fireplaces" right at the top. How can we remove this? Here is the code we have to pull in the navigation data:
<?php perch_pages_navigation(array(
'template' => 'main_navigation.html',
'include-parent' => false,
)); ?>
Inside the main_navigation.html template, we have this:
<li class="main-nav-top">
<a href="<perch:pages id="pagePath" />"><perch:pages id="pageNavText" /><perch:if exists="subitems"> <i class="icon-down-dir"></i></a>
<div class="dropdown">
<ul>
<li><a href="<perch:pages id="pagePath" />"><perch:pages id="pageNavText" /></a></li><perch:pages id="subitems" encode="false" />
</ul>
</div>
<perch:else /></a></perch:if>
</li>
We've included the 'include-parent' => false
but it still shows it for some reason.
Thanks!
Change this:
to simply this:
Great, this worked. Thank you!