Forum
Navigation with dropdown - selecting the parent page
With Bootstrap navigation, the parent of dropdown menus are given a #
as the href
which toggles the dropdown, enabling touch screen users to see the 'hover state'.
But, this means the parent item is not accessible because it does not appear in the dropdown list.
Is there a way to get Perch to output the parent item in the dropdown menu too?
<li class="dropdown">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">About Us</a>
<ul class="dropdown-menu dropdown-menu-left">
<!--Would like link to 'About us' to go here-->
<li><a href="#">Job Vacancies</a></li>
<li><a href="#">Accreditations</a></li>
<li><a href="#">Our Clients</a></li>
<li><a href="#">News</a></li>
</ul>
</li>
What does your template look like?
level1.html
level2.html
level1.html
level2.html
Thank you very much.
Simon, did you create pages with no content to make the parent, in your case an empty "About Us" page?
Hi Andrew, no I didn't, the About Us page has content.
If anyone is using Foundation 6 then this is what I i created and it worked for me, the pages with no link I set as a top level page as a link.
level1.html
level2.html