0

Facing an issue with getting views to generate a proper URL similar to the way taxonomy allows me to click on a child term with the path: domain/term/artwork/mirrors (path alias is configured)

Vocabulary:

Product sections
- Artwork
-- Hand Painted
-- Mirrors
- Novelty
-- Ceramic Mugs
-- Stickers
-- Books
- Wearables
-- Shirts
-- Shoes
-- Personalized Shoes

I currently have a taxonomy view with 2 contextual filters: Content: Has taxonomy term ID (with depth) AND Content: Has taxonomy term ID depth modifier

Content: Has taxonomy term ID (with depth) is configured with...
• Depth: 1
• Set the breadcrumb for the term parents
• Display contents of "No results found"
• Specify validation criteria - Taxonomy Term from 'Product Category' vocabulary.
• Filter Value Type: Term name converte to Term ID
• Check Transform dashes in URL to spaces in term name filter values

Page Path: /category/%

With my current setup, I can go to: domain/category/artwork and this displays all content which is categorized under artwork (hand painted and mirrors)

What i need is domain/category/artwork/hand-painted but it displays all artwork regardless if its hand painted or mirrors.
BUT this path, domain/category/hand-painted works correctly. How do i make the url respect the parent term. It seems like views cant interpret a parent - child relationship.

I plan on creating parent term pages outside of this view so the parent term path /category/artwork won't be handled here.

Last thing to note is the node path pattern:
category/[node:field-category:parents:join:/]/[node:field-category:name]/[node:title]

• domain/category/artwork/hand-painted/fancy-painting

1 Answer 1

0

I solved my problem by adding the Taxonomy Views Integration module and specifying my existing view page. -https://www.drupal.org/project/tvi

Next I had to modify the contextual filter to only have 'Basic Validation' and also remove "%" from the page view path.

Now the URL's are exactly what core taxonomy builds but it outputs the view i created

Hope this helps someone else! :-)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.