get only root levels of taxonomy in view
I have Hierarchical vocabulary like
Audi
- A3
BMW
BMW c4
BMW x11
In my views page I want to all parent terms in page, like
Audi
BMW
How to do this?
Thanks for your answ开发者_StackOverflow社区ers
You can get that with the URL like
taxonomy/term/[tid]/all
This will display the content of all subterms.
The answer is going to vary by site.
If you install the pathauto module (http://drupal.org/project/pathauto) you can do this easily.
Once pathauto is installed, hop over to /admin/build/path/pathauto and expand 'Taxonomy term paths.'
What you want to do might not be the same as me, but I like to use:
category/[vocab-raw]/[catpath-raw]
This gets me all the data I need at:
example.com/category/tags/[term]
If you don't want that, consider going with views which allows for lots of customization, including the URL.
精彩评论