I have a Drupal View that displays the 2 most recent articles from our db. How do i allow a user to select which article they would like to display. And, if the user does not choose the 2 articles then the 2 most recent will be shown.

I tried to use filters and the "Expose this filter to visitors, to allow them to change it" option. But I cant seem to figure out how this would be done.


  • Have you try With Flag Module ? – Rupesh Jun 19 '15 at 14:20
  • No, let me take a look at that! – cthrucode Jun 19 '15 at 14:22
  • Seems like a great module but we would'nt want our users to have to flag content. Our intentions is to use the view's display "page" option to drive a user to a page so that they could choose which articles they would like the view to display. – cthrucode Jun 19 '15 at 14:29
  • How are you loading your view, through an url or as a block? I wondering if you use views_embed_view() e.g loading your view programatically? – Cyclonecode Jun 19 '15 at 15:28
  • How many articles should your user be able to select, 1 or 2? If so, how would you do this? Checkboxs, Autocomplete (by title, by date)? How many articles would would your users be selecting from? If you have hundreds of articles then checkboxes or a multi-choice list might get out of hand. I know you nixed the flag module, but this is likely the route I would take if I was facing this issue. – Citricguy Jun 21 '15 at 1:47

I would pass the argument in via the URL, you can pass multiple args in using '+'. So http://example.com/my-view/[nid1]+[nid2]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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