0

I want to display a result in a view, and each time I visit the page, the result will be the next node from the choosen contenttype.

Is this something I can manage in views or is there any other way?

1
  • 1
    "each time I visit the page, the result will be the next node from the choosen content type" - what happens if another user visits the page during that time, what do you see then? Commented Jan 2, 2013 at 10:02

2 Answers 2

1

In Views Sort criteria Section Choose the Global and then choose Global: Random field, it will display each time different result(when the page is refreshed) but it will be random.

I hope it will help you.

1
  • This is almost what I want to achive. I skipped this "random" thing cause it has to be shown like 1, 2, 3.
    – Daniel
    Commented Jan 2, 2013 at 9:22
0

In a nutshell you need to create a view with a contextual filters "nid".

then in your custom module you should implement hook_node_view() and inside this hook you should set a variable after incremental.

then you would need something like views embed view to send the variable to the view and get your result.

let me know how it goes.

2
  • Well, all I use is views, no custom module. And I'm not a "pro" drupal user so I don't know how to use all drupal hooks etc.
    – Daniel
    Commented Jan 2, 2013 at 9:38
  • take a look at the [Serial] (drupal.org/project/serial) it may come in handy.
    – saadlulu
    Commented Jan 2, 2013 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.