Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Help with nextSibling(), prevSibling(), isFirst() and isLast()

Started by Muut Archive 12 years ago · 2 replies · 937 views
12 years ago

Hello,

Maybe I'm overlooking something really obvious here, however I'm after some help / examples on how I can use nextSibling, prevSibling etc.

If I attempt to use any of the above methods, like:

page.nextSibling()
page.nextSibling().url
...
etc.

I get a Twig_Error_Runtime thrown up. Any examples or help how I should be using these would be greatly appreciated.

Basically, I'm trying to implement a previous/next article navigation control at the page level.

Thanks!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1279 9 years ago
Archive · by Muut Archive, 9 years ago
2 886 9 years ago
Archive · by Muut Archive, 9 years ago
2 4015 9 years ago
Archive · by Muut Archive, 9 years ago
1 2891 9 years ago
Archive · by Muut Archive, 9 years ago
3 1075 9 years ago