1

I have a View with some contextual filters which works great. I also need to provide my users with some way to change the filters once they're on the page.

I've tried using exposed filters but I'd rather use path arguments over query string parameters and there is the conflicting issue between exposed filters and contextual filters which the Views Filter Harmonizer module address but in my case this doesn't work as I'm using some non-taxonomy filters.

So basically what I'd like to do is have a form which allows users to select values which could be passed as contextual filters.

Any help/guidance?

0

To find "... some way to change the filters once they're on the page ..." (as in your question), it may help if you take a look at the (free) video about Contextual filters with paths. It covers these topics:

  • Using contextual filters for filtering Views result.
  • Using input from the view path to set contextual filter values.
  • Using contextual filter values for changing the view title.

You may also want to watch some (or all?) of these related videos, also about contextual filters, sometimes called "arguments" also (quotes are from the links mentioned):

  1. Action if no contextual filter value is present, with these topics:

    • Different views behaviours if no contextual filter value is present.
    • Some words about why 'provide default value' is a bad concept.
    • The provide summary option.
  2. Contextual filters and menu tabs, with these topics:

    • Using contextual filter values inside a path (instead of at the end of it).
    • Re-using existing site paths to get contextual filter values.
    • Creating menu tabs in Views.
    • Creating a menu tab on user pages, to display all articles created by the user.
  3. Default menu tabs, with these topics:

    • How to use the default menu items in Views.
    • How to create sub tabs.
    • How to use default menu items together with contextual filters in the path.
  4. Validation of contextual filter input, with these topics:

    • How to validate input for contextual filters.
    • Some options for how to validate the input.
    • Why it is a good idea to validate contextual filter input.
    • Views behaviour if the filter input doesn't validate.
    • Some words about not being able to validate contextual filter input with multiple values.
    • Perhaps some words on filter validation being able to alter the filter value.
  5. Contextual filters and default values, with these topics:

    • What default contextual filter values are.
    • How to set default contextual filter values.
    • Some examples of extra settings for default contextual filter value.
    • Some words about why it is a bad idea to let the view make assumption about the context where it is embedded.
    • Some more words about why it is a bad idea to let the view make assumption about the context where it is embedded.
    • Some words about using default contextual filter values when creating Views blocks.

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.