1

I have a Taxonomy which looks like this:

Parent1
-Child1
--SubChild2
--SubChild3
-Child4
--SubChild5
--SubChild6
-Child7
Parent2
-Child8
-Child9
--SubChild10
-Child11

I have created a view to display all terms under a specified Parent by setting a context tid . Here you can find the exported view: http://pastebin.com/us7KnKsD

The Problem is that the view only shows the terms which have sub-children.

How can I also display the terms which doesn't have sub-children? Is it possible with views? In php I would just create some recursive function...

2
  • Isn't that that you set Require this relationship in the relationship setup dialog? May 8, 2012 at 9:44
  • Changing this setting have no effect concerning to the problem
    – chriszero
    May 8, 2012 at 10:25

2 Answers 2

2

Start your query from the Taxonomy table. Meaning select Taxonomy as your base table when creating your view. Then establish a relationship to your content from there. This will ensure your results contain all taxonomy names and then their subsequent children.

1

You can use the module Views tree

enter image description here

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.