tags:

views:

21

answers:

1

I want to display a different set of 2 or 3 images in a block on each page. So far, I have:

  • Added images to each page using CCK and filefield.

  • Removed the images from $content.

  • Created a view with node ID (Nid) as the argument, and added the field created with CCK, and added display type of Block.

When I try the Live Preview, it will display all the images for all pages in the block. When I enter the Node ID variable, it adds a where clause to the sql query and displays the correct images for that page.

How (where) do I set it up so that the view recognizes that it is on Node 3 and displays only the images for Node 3.

Thanks

John

+1  A: 
  1. "How (where) do I set it up so that the view recognizes that it is on Node 3 and displays only the images for Node 3." -- you can do this by clicking on the settings for the Nid argument in Views. Under Action to take if argument is not present: choose Provide Default Argument. In that, choose Node ID from URL
  2. Position your block in the appropriate region (left sidebar, right sidebar etc). Make sure the visibility settings of the block are such that it only appears at paths that match node/*
Sid NoParrots
Sidharth, thank you so much! That was perfect!
John Rand