I have 3 content types created for projects.
Each content type links into a details page
Each details page has an image at the top

I have created a block view to display said image but I am getting ALL the images for the content type.
Example I have 3 detail pages under content type 1 on all of these 3 detail pages I am seeing 3 images.

What I need is to filter so that the image only appears that is linked to the node id.

I have tried filter by node id but it requires a static id.

I have tried arguments but I am using friendly URLs so my page urls are not node/{node id}

So is their a syntax to place a php varible into the filter field or another way I can do this.

I cannot use upload file becasue of other considerations to long to go into here.

I figure Views has some way of filtering/arguing so that it can determine the node id of the page it is presently displaying.

Any help with this would be greatly appreciated, thank you.

Comments

nevets’s picture

Even though you are using friendly urls Drupal and views still uses node/{nid}.

TheresaB-1’s picture

OK, then where do I place that syntax in the views so that my image will by displayed according to its node id?

I have placed that in the php like this

http://www.kslb.org/picture_12.png

Nothing happens. What am I doing wrong as I know the problem is between the chair and keyboard.

"Never Attribute to Malice, That Which is Easily Explained by Stupidity."

nevets’s picture

How are you adding the image to the content type? If you are using an image field you might want to check out CCK Blocks which provides an alternative way for showing CCK fields.

bestknight’s picture

Maybe you are looking for the views argument under views? For the said block:
Add argument: Node -> Node ID
Action to take: Provide default argument -> Node id from URL