By dan.crouthamel on
Let's say I have the following.
A view which displays videos ordered by date. A user chooses one of the videos and opens the pages (node). On this node I would like to attach a block, that would show the previous and next video in the view they came from. How would I go about setting that up? Would I just use the views module, create a block display, and pass some sort of argument that let's me know what node I'm currently on?
Any help on how to set this up will be greatly appreciated :)
thanks!
-dan
Comments
Load the view-data with PHP
Hello dan,
I don't know a direct way to handle this with views UI. But you can set up a block and load the view with PHP starting in this way:
Now you have the views-Items in an array. You can find the current nid in it and look for the prev and next nid in your item list to build your links.
kind regards,
Carsten
--
There is a module for that!
My company: Nodegard GmbH