0
votes

I want to make a slideshow in a node that only shows images that are uploaded in that same node by the site admin (showing product images). I have managed to create a Views slideshow that shows images from a "field collection", but my trouble is that every node shows all images uploaded on any node, not only the ones that belong to its own node.

I have now unchecked the option "display all results for the specified field" and guess that I would need to write som PHP code for the "default value". The contextual filter that I have chosen is "Field collection item: Field collection item ID.

Can anyone suggest a PHP code for the default value that returns this Field collection ID. Or maybe I should use another contextual filter.

Edited: I should mention that I have cretaed the slideshow as a block, and not a page, thus the node ID is not supplied through the URL

1
You should check the second radiobutton: providing the content ID fromURL. It does not matter if it is not a page but a block. - morels
I thought I read somewhere in the documentation that you need to use "page" to get info via the URL, but maybe I am wrong. I will try this, thanks. - TBJ

1 Answers

0
votes

In view you need to add a FILTER CRITERIA Content: Type (= Your Content Type] )