Hi,
I’m working on a getting my own custom cms to show all top level pages and sub pages into a bootstrap navbar.
My test site currently has a home page and an about us page with two child pages and there is an additional test page which has no children.
On the home page, everything is working as I’d expect. If you click on the about us page the two child pages can be selected. However, if I’m on the test page, the child pages don’t appear as drop downs when clicking on the about us link.
As far as I can see, the output code for the nav bar on all pages is the same:
HTML on test page:
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><a href="http://www.mysite.com">Home</a></li>
<li class="dropdown"><a href="http://www.mysite.com/About-Us" class="dropdown-toggle" data-toggle="dropdown">About Us</a>
<ul class="dropdown-menu">
<li><a href="http://www.mysite.com/About-Us/About-Page-1">About Page 1</a></li>
<li><a href="http://www.mysite.com/About-Us/About-Page-2/">About Page 2</a></li>
</ul>
</li>
<li class="active"><a href="http://www.mysite.com/Test-Page">Test Page</a></li>
</ul>
</div>
HTML on home page:
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="http://www.mysite.com">Home</a></li>
<li class="dropdown"><a href="http://www.mysite.com/About-Us" class="dropdown-toggle" data-toggle="dropdown">About Us</a>
<ul class="dropdown-menu">
<li><a href="http://www.mysite.com/About-Us/About-Page-1">About Page 1</a></li>
<li><a href="http://www.mysite.com/About-Us/About-Page-2/">About Page 2</a></li>
</ul>
</li>
<li><a href="http://www.mysite.com/Test-Page">Test Page</a></li></ul>
</div>
If anyone has any ideas or knowledge on why this might be happening, that would be hugely appreciated.