Skip to main content
6 of 7
added 460 characters in body
wot
  • 111
  • 3

Passing values to a view block

I have a page that contains 4 separate blocks, from the same view,

Items block 1 - this contains a list of item titles Items block 2 - this contains a different list of item titles Content block 3 contains content unrelated to this functionality Results block 4 - this needs to display the details of the items that are highlighted in the above 2 sections after the user selects 'Next' in list 2.

I've found some information about passing variables to a view using contextual filters, but I'm not clear on exactly how this works still

  • how do I set up a filter - does it go in the source or target block or both?
  • how do I access the value in the target block?
  • how do the values get passed, on the URL, or as session values?

also my situation involves passing variables from 2 view blocks to another view block.

And presumably AJAX would need to be used to load the third view?

I could split the third block into 2 and display results from block one and block two separately, if that's any easier.

But I'm really not sure how to set up a filter or how to use the passed values, or how exactly contextual filters work, any guidance appreciated.

Update: I have updated this question to try to make it clearer what I have and what I need to do.

Thanks to Remy I understand how the filter value is accessible, but I still don't understand the following:

  • To use a contextual filter do I need to create areas 4 (and 2) as attachments rather than blocks, or child blocks in the footer, or other?
wot
  • 111
  • 3