So I am开发者_高级运维 on a seemingly simple mission of creating previous/next buttons for a type of nodes, like for pages in a book. Sounds easy enough, considering that there is the Custom Pager module. But, the module does not work for nodes which are built using panels, as described in this bug: http://drupal.org/node/591782
There is another module which creates an API for this operation, but it does not seem to have custom sorting based on a view.
Any ideas would be highly appreciated and thank you in advance.
What about using the views module (and its built-in pager functionality) to display a single node at a time?
In the end I used the code described in the bottom of this page, but had to modify it a little to sort by date:
http://drupal.org/node/37767
Then put it into a custom content pane using (note that I rearranged the variable order):
print node_sibling(node_load(arg(1)), 'previous')
print node_sibling(node_load(arg(1)), 'next')
精彩评论