3

I am trying to filter views output using Parameters from url with views contextual filter. There are two fields on the content type :

  • 1.field_sku
  • 2.field_width

I simply added the contextual filter for the first one , but as i add the second filter it doesn't work. Is it posibble to add multiple contextual filter to a view?

  • Of-course you can add multiple contextual filters. Could you please add more information about how you're using it. – Mathankumar Jun 25 '13 at 16:27
1

It is because how you get them,contextual filter usually get from url and when you have 2 , you should have 2 parameter in url , as example it should something like "mysite.com/3/reza", this is one step, another step is that you specified in your contextual filter that which arg is for this filter(put your default value in raw value form url,then you see path componet), (in my sample 3 is arg(0) and reza is arg(1) ) and if you observe this note it work for you correctly.

1

The question isn't well described, but i think this is your solution:

Querying the configured multiple contextual filter isn't working as i expected first and I spent lot of time to figure out why, then finally the solution was found:

Instead of Content: The name of Taxonomy (taxonomy_vocabulary_#) you need to select Content: Has taxonomy term ID Contextual filter and enable Allow multiple values to able to use multiple values in the form of 1+2+3 (for OR) or 1,2,3 (for AND). If You have another Contextual filter configured, you can separate the query with "/".

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.