2

The question is a pretty simple one, I've created a page-view with an exposed filter. The page-view itself contains a block-view. I was wondering if the value of the exposed filter (which is in the url) could be used as a contextual filter in the block-view.

So far I've tried 'get content ID from url' and 'get raw value' but neither seem to work as the block-view returns no results.

5

Please follow below steps to achieve functionality that you are looking for.

  1. Disable AJAX feature for view.
  2. In the block view add a contextual filter and select type as Provide default value >> Type as php code.
  3. In the php code read the exposed filter value using $_GET[]
  4. Return the value you got from $_GET to contextual filter.

In that way you can able to pass exposed filter value to the contextual filter.

|improve this answer|||||
  • Works, cheers mate. – Zedicius Sep 12 '12 at 9:26

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.