1

In views, is it possible to have two contextual filters, making one mandatory (return no results if not supplied), and the other optional? I'm using a php filter to get the group id for the og_group_ref field, and it works well, but then I add another filter on another field, and I need to be able to check only on certain pages (that provide the param in the url), or else, just return all record. I tried a conditional for the second filter, like

    if(some test){
      return field_value;
   }
    else{
      return 'all';
   }

That didn't help either.

Your Answer

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

Browse other questions tagged or ask your own question.