Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By ssankarsiva on
Hi All,
I have created a Page listing using views, instead of listing all nodes. I am trying to list only the selected nodes by dynamically, I need to pass particular node ids to views so I got selected node ids but how to pass those ids to views.
Pls guide me how to pass those ids to views
Thanks in Advance
Siva
Comments
This is very easy. In views,
This is very easy. In views, look at the right-hand side and click on 'Advanced.' Then select either filters or arguments which will enable you to pass in specific node ids. There are a million tutorials on Google explaining the precise steps with image shots. All the best.
I hope this helps.
I followed the same process
I followed the same process already after sometimes and added nid as a contextual filter and passed dynamic nids into hook_views_pre_view function
Thanks for your comments.