0

I am having vocabulary containing hierarchical taxonomy like this :

  1. Category1
    1. subcategory1
      1. lastcategory1
      2. lastcategory2
    2. subcategory2
  2. category2

I am using pathauto to taxonomies path .

Path are like this : www.example.com/category1

www.example.com/category1/subcategory1

www.example.com/category1/subcategory1/lastcategory1

At first path i want to show all subcategories taxonomy of category1 .

At second path i want to show taxonomy detail page of subcategory1 and below details i want to show subcategories of subcategory1 taxonomy .

At last path i want to show content connected to lastcategory1 taxonomy .

How can i accomplish this using views .

Note : I don't want to change the taxonomy paths . I am using drupal 7

0

See this tutorial. Looks like it does exactly what you ask.

The tutorial includes a video but here is the written explanation:

1) Create a Taxonomy Vocabulary here: admin/structure/taxonomy (And create a few terms)

2) Create a Taxonomy View here: admin/structure/views/add

You want to make sure that you choose "taxonomy" entities.

3) Add a contextual filter for "Taxonomy term: Parent term"

Make sure to select "Default Filter" and choose "Taxonomy term from url." Also, specify a "Default validation criteria" for "Taxonomy term" and choose "Convert taxonomy name to ID" and select "Transform dashes in url..."

4) Add a new page to this view, remove the contextual filter from this view and add a filter for "Taxonomy term: Parent term" and set it to "equal to" and leave the field there blank.

5) Save that view and create a new view here: admin/structure/views/add

Make sure this view is for a "Content" of type "Product Display" (or whatever entity bundle has the field for your taxonomy terms).

6) Add a contextual filter for your taxonomy term, mine was called "Product Categories"

Make sure this contextual filter displays "Contents of No Results." Also, specify a "Default validation criteria" for "Taxonomy term" and choose "Convert taxonomy name to ID" and select "Transform dashes in url..."

7) Add a "No results" item called a "View Area" and select "Page_1" from your first view (this is the second page we created)

8) Save this view and go back to the first view.

9) Add a "No results" item called a "View Area" and select the second view that we just made.

10) Make sure your title field in the Taxonomy View doesn't link to the taxonomy term, but it outputs the field as a link to "catalog/[name]" that way your catalog names are clickable

  • While that link provides an answer to the question. It would be better to add necessary part here. Link only answers became invalid if the link changes – Krishna Mohan Nov 14 '14 at 13:45
  • Have updated to show step by step instructions. – Lance Holland Nov 14 '14 at 17:24
  • @Lance1412 i have written i don't want to change the taxonomies path and accoriding to this tutorial i have to make cutom path . I want three different view on taxonomt term path i.e taxonomy/term/% . – Yatendra Singh Nov 18 '14 at 10:21

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.