1
votes

I am finding some troubles how Views works with taxonomy terms. I hope you can help me. :-)

I am building an e-commerce site with Drupal Commerce since it has all features I need for my project requirements but I don't know how I can list terms and nodes belong to concrete taxonomy on Views.

I have a product hierarchy taxonomy with all the site product categories. I use Taxonomy menu in order to show this taxonomy in a menu block allowing the user to select any term. A product display node only can be referenced to a sheet term on the taxonomy tree.

I want to use Views by listing as terms as nodes, if the user click on a non-sheet term on taxonomy menu, the view should show the subterms from clicked term. But in the other hand, if the user clicks in a sheet term then the view should show nodes referenced to the clicked term.

For instance,

Let's imagine I have the next taxonomy menu:

products
    term1
        term1.1
        term1.2
            node1
            node2
        term1.3
    term2
        node3
        node4

If the user clicks on term1 term the view should list term1.1, term1.2 and term1.3 but if he/she clicks on term1.2 it should list node1 and node2.

How can I do this on Views? How can I list two different types of entities depending what term is clicked?

Thanks in advance!!

1

1 Answers

0
votes

You need some js to do this. So you can use the dHTML_menu or similar dynamic menus.