Previous / Next links only within the children
Posted: Mon Sep 12, 2011 9:37 pm
I would like to have previous / next links, but only within the children of a section. While the first page (2.1.) doesn't have a previous link to the previous Content page (1) the last item (2.5.) does have a next link to item (3.1.).
The problem is that I don't want the last Content Page 2.5. linking outside its siblings. Ideally it would not show a next link at all on this page.
I want it to be an extendable solution as lay users will be adding content to this section and it may not be the last item for long.
I have a menu like this:
1. Content
2. Section Header
2.1. Content
2.2. Content
2.3. Content
2.4. Content
2.5. Content
3. Section Header
3.1 Content
[etc]
My code looks like this:
Any ideas?
The problem is that I don't want the last Content Page 2.5. linking outside its siblings. Ideally it would not show a next link at all on this page.
I want it to be an extendable solution as lay users will be adding content to this section and it may not be the last item for long.
I have a menu like this:
1. Content
2. Section Header
2.1. Content
2.2. Content
2.3. Content
2.4. Content
2.5. Content
3. Section Header
3.1 Content
[etc]
My code looks like this:
Code: Select all
<p class="previous">{cms_selflink dir="previous" label=""}</p>
<p class="next">{cms_selflink dir="next" label=""}</p>