Search code examples
drupalviewdrupal-7

Drupal view path and taxonomy term


I have two taxonomy dictionary: location, type. I need view that path will be like show/location/type and view show of specific location and type


Solution

  • It sound like you might want to use contextual filters in your view (in the advanced tab). This way you should be able to pass filter values to your view in the view path.

    Depending on what you're trying to achieve you may need to try different settings. If I understand correctly and your "location" and "type" in view path are term names, you will need something like this:

    • Under "Provide default value" select Raw Value from URL and path component
    • Under the form "When the filter value IS in the URL or a default is provided" select the option "Specify validation criteria"
    • Select "Taxonomy Term" as the Validator
    • Select your vocabulary
    • Under "Filter Value Type" select "Term name converted to term ID"
    • Check "Transform dashes in URL to spaces in term name filter values"