Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Next and Previous Page links


Go to End


2 Posts   2263 Views

Avatar
eceers

Community Member, 24 Posts

12 January 2010 at 11:12pm

Edited: 12/01/2010 11:14pm

Howdy,

I have a list of pages in a tree something like this

  • Project 01
    • - Example 01
    • - Example 02
    • - Example 03
    • - Example 04

  • Project 02
    • - Example A1
    • - Example A2
    • - Example A3
    • - Example A4

Is there a Method in Silverstripe that allows me to be on the "Example 02" and display links the Previous (Example 01) and Next (Example 03) pages and when I get to the Example 04 page I can hide the Next link as I would the Previous link on Example 01 page.

I've tried looking into my own SQL statement to retreive it, this is roving quite out my league as I'm not really sure on what I'm doing.

Any help wold be greatly appreciated and if I'm asking a simple question from something I've missed in the Documentation I apologise.

Thanks in advance

Avatar
eceers

Community Member, 24 Posts

12 January 2010 at 11:36pm

Sorry for bothering people with this. A quick 2 second search here on the forum dug up this http://doc.silverstripe.org/doku.php?id=recipes:previousornext

SOR-TED.