1

I have a site divided in 4 organic groups:

  • Product
  • Corporate
  • Data
  • Users

Users belonging to a group are able to post content in that group as well as read it. Every group has its page accessible through the following URLs

  • example.com/product
  • example.com/corporate
  • example.com/data
  • example.com/users

in which an overview of the latest content published in that group is shown inside a set of panels.

Every group has an specific vocabulary of 4 terms in order to subdivide content classification a little bit more.

THE GOAL IS:

I want to build some pages with page manager so that when a visitor types an URL like example.com/product/foo a page with the same design as the others is shown but filtering the contents inside that group to those tagged as "foo".

To achieve this I've started creating a page variant that would deal with requests in the form /product/%tag with the condition that %tag is a term in the "product" group vocabulary.

Up to this point, this works. When a user browses to example.com/product/foo the page shows as it should, and when it browses to example.com/product/bar (bar is not in the vocabulary) a "page not found" message is displayed.

Inside the views manager I also created a content pane view with the contextual filter based on term ID that:

  • When the filter is not available displays all results.
  • When the filter is available

    • Specify validation criteria
    • Validator: Taxonomy term
    • Vocabularies: corporate, data, product, users
    • Filter value type: Term name converted to term ID
    • Transform dashes in URL to spaces...
    • Action to take if filter doe not validate: Display content of "no result found"

THE PROBLEM:

The preview works well in the view admin page when providing the contextual filters but when I try it on the actual page, the "no results" found content is show.

Is there something I have to do with the "Argument input" option inside the views admin page? Am I trying to solve this issue twice by using page manager and contextual filters (should I use only one approach)?

0

Ok, answer to my question is that when the filter is not available, I should provide a default value -> raw value from URL -> path component = 2

And check "use path alias" option to avoid using regular paths.

And also argument input = from panel argument (first).

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.