Loading

How to get next page

If you're view a child page, how do you get the next "sibling" ?

Page "My Colors"
Child Page "Red"
Child Page "Green"
Child Page "Blue"

If I'm on page "Green" what is the easiest way to get the data for page "Blue"?

Official response from Jesse Haff

The easiest way to do this is to have "Include in top nav" checked for the parent and subpages. That will add them to a drop down menu, and it will also add a subnav of the subpages to the top of the content area. An example of this is the NationBuilder FAQ page.

If you don't want the pages to be in a drop down, or to be included in the top nav, you can edit the subpage (aka child page) template so the subnav is shown even if you "Include in top nav" isn't checked. Just replace this:

With this:

<div class="subnav_container" id="subnav_container">
<div class="navbg">
<ul id="subnav">

</ul>
</div>
</div>
<div style="clear: both;"></div>

How would you tag this suggestion?
Do you like this suggestion?

Showing 7 reactions


Jerimee Richir commented 2012-05-15 10:47:03 -0700 · Flag
I don’t think this is what I meant. What I want is to be able to get the object data from a sibling page.

/cain is a page. /able is a page. They are both descendants of /adam

How do I print /able ’s title (or any other object) within the /cain page? Is there a good solution for referencing a page via a sibling?
Lilia Villa tagged this with Answered 2012-05-15 10:00:19 -0700
Ron Smith commented 2012-05-03 12:51:29 -0700 · Flag
same results as tsuyoshi, here: a page doesn’t seem to exist in nav_children unless its’s set to show in topnav
Tsuyoshi Orihashi commented 2012-03-27 20:45:03 -0700 · Flag
in my case, the subnav doesn’t appear on certain pages with subpages even when the topnav checkbox is checked.
Jesse Haff responded 2012-01-11 12:23:30 -0800

If you're view a child page, how do you get the next "sibling" ?

Page "My Colors"
Child Page "Red"
Child Page "Green"
Child Page "Blue"

If I'm on page "Green" what is the easiest way to get the data for page "Blue"?

Felicia Willems tagged this with Helpful 2012-01-11 12:00:52 -0800