Grab each Parent pages' child pages - Autonav
Permalink
Hi, I am trying to build a dynamic tabbed menu that shows each of the Parent pages in <li> tabs, and clicking each tab displays a hidden <div> that contains each Parents' pages child pages, eg:
<li>Parent Page 1</li> / <li>Parent Page 2</li> / <li>Parent Page 3</li>
<div>Child 1a,1b,1c</div> / <li>Child 2a,2b</div> / <li>Child 3a,3b,3c</div>
I can amend a custom template to show each of the Parent pages:
I can also display a child <div> for each Parent <li> using this:
but each of the <div> boxes is empty as I don't know the code required to display the corresponding Parent <li> child pages in each.
Many thanks in advance!
<li>Parent Page 1</li> / <li>Parent Page 2</li> / <li>Parent Page 3</li>
<div>Child 1a,1b,1c</div> / <li>Child 2a,2b</div> / <li>Child 3a,3b,3c</div>
I can amend a custom template to show each of the Parent pages:
I can also display a child <div> for each Parent <li> using this:
echo '<ul id="header_navtabs" class="shadetabs">'; foreach ($navItems as $ni) { echo '<div id="header_nav' . $ni->cID . '" class="tabcontent">; echo 'I would like each Parent pages' child pages displayed here' echo '</div>' echo '<a href="#" rel="header_nav' . $ni->cID . '">' . $ni->name . '</a></li>'; } echo '</ul>';
but each of the <div> boxes is empty as I don't know the code required to display the corresponding Parent <li> child pages in each.
Many thanks in advance!
Can you make a mock-up to describe what you are trying to make?
An image mock-up would help and even better an HTML/CSS version.