0

I have a view with multiple fields:

Nid Title Content Image

On my page, I use the nid as a selector ( I have a button elsewhere on the page tied to it) to open my content without going to another page. The images are also loaded. Only problem I have is that I need to find a way to ensure that only the images for the view row's [nid] are being output, rather than all of them. The [nid] filter requires a hard value and I'm looking more for a "current page" ish kind of thing.

Basicaly, I want to load only the images that have the same nid as the content being displayed in each row.

How would I set up a filter for this?

  • did you try contextual filter? – Krishna Mohan Mar 27 '14 at 5:48
1
  • Edit your view
  • Create Block View
  • Add Contextual Filter enter image description here
  • Add Content:Nid enter image description here
  • In settings choose : Content Id from URL enter image description here
  • Enable your block in your node pages where you would like to display images
  • I tried this method, but it didn't work on this particular view (probably because all the content is output on the same page) Whenever I use this contextual filter, I get no image output at all. My page structure is as follows: <Set of links to open content that is hidden below> <Content 1> Text Images <Content 2> Text Images By clicking the links, the corresponding content slides open (jquery with NID matching). Feeding in the Content ID from URL would provide the View with just the NID of the actual View page right? – user27448 Mar 27 '14 at 16:07
  • Is there such a thing as 'content id from field' perhaps? – user27448 Mar 27 '14 at 20:10
  • Can you add that js as a gist or pastebin? It will make it easier to understand your question. – Capi Etheriel Mar 28 '14 at 4:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.