1

I make use of the view: "taxonomy term". Is there an easy way to also show the children of a term, next to the nodes beloging to this term?

Example:

Cars
- Volvo
--- Family_cars
--- Sports_cars
- Honda
--- Parts
--- ...
Trucks
- ...

When you see the "cars" page I want to show all articles about cars (but not about Volvo, Honda, ...) AND I want to show the children (Volvo, Honda, ...) When you click one of these I want to show all the articles belonging with them, again with their children.

2 Answers 2

2

If I understood you correctly, you want to display nodes that have a term, but not the nodes that have a child term.

You also want to display the child terms.

There are some different ways of handling this, since you are using the default view, you should get a View already that displays the correct nodes - so all you are missing is the terms.

The best way to deal with this, is not through Views, but a module called Taxonomy menu. It will create a menu with the same structure of a vocabulary which can expend, to show child menus. As with menus you get use the block system to add them on the term pages. Beware of a bug with the menu system though see the issue.

A quick fix is to add this in your settings file:

$conf['menu_default_active_menus'] = array(
  'navigation',
  'management',
  'user-menu',
  'main-menu',
  'your-menu-here',
);
0
0

1.taxonomy/term/x -- where x is the term id to show, a number.

2.to show children nodes you need to add a depth variable. The syntax is: taxonomy/term/x/y -- where x is the term id to show, and y is the depth to go below x.

3.to show all children nodes. The syntax is: taxonomy/term/x/all -- where x is the term id to show.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.