Drupal: How to create a View that shows results only from the current node
Posted Sat, 02/06/2010 - 1:27am
Let's say you want to create a Views block that shows on a bunch of different pages/nodes that have multiple (imagefield) images per page, and you want the block to dynamically display ONLY the images from the particular node you're on--and not display images from other nodes.
This is how you would do it:
1. Create your view as you normally would.
2. Add "Node: Nid" under "Arguments".
3. Select "Provide Default Argument" under "Action to take if argument is not present:"
4. Select "Node ID from URL" under "Default argument type:"
5. Leave everything else as is...
6. Hit "Update" and then "Save"... and you're done.
Comments
Thanks
by Jef - 04/09/2010 - 5:00am
Thank you for that!
thanks dude
by Anonymous - 10/30/2010 - 11:45pm
thanks dude
thanks dude
by Evgeny - 10/30/2010 - 11:46pm
thanks dude
Thanks for the the post! That
by Anonymous - 11/02/2010 - 1:25am
Thanks for the the post! That was Hilarious!!
Nmhdheeslbcdahtthr
by Duren6250 - 12/09/2010 - 11:28pm
Nmhdheeslbcdahtthr ejdwvyyacoo
Thank you! That was exactly
by Lisa - 01/27/2011 - 5:23am
Thank you! That was exactly what I was looking for! :)
What if I wanted to show the view inside the node? As I understand it it should be possible using views attach but I can't quite understand how it works…
this works well, but what if
by Anonymous - 05/12/2011 - 3:48pm
this works well, but what if you have automatic alias turned on. I tried using Node: title but it doesn't take into account the directory path.
Thank you this worked for me!
by Anonymous - 06/17/2011 - 10:10am
Thank you this worked for me!
awdfsf
by dasds - 06/19/2011 - 11:40pm
awdfsf
Post new comment