By weblinq on
I made taxonomies like:
- Term A
- term A
- term B
- term C
- Term B
- term D
- term E
- term F
I added terms to nodes. So I have two nodes with term A, a node with term B and a node with term C.
I have a menu like:
Term A
Term B
When I click Term A I want a page that sort the subterms and their nodes. Like:
Type A
- node 1
- node 2
Type B
- node 3
Type C
- node 4
How can I accomplish this with a view?
Comments
View with Grouping field
Create a View based on Node
Add field for Taxonomy: Term (Choose to exclude from display)
Add field for Node: Title (and whatever else you want displayed)
Edit the Style settings (the gear icon)
Choose Taxonomy: Term from the Grouping Field dropdown
Filter and style as you like
Thanks that works, but it's
Thanks that works, but it's not exactly what I ment.
I've got:
Terms (Brand):
Brand A
Brand B
Brand C
Brand D
Terms (Types):
Type A
Type B
Type C
Type D
Nodes (Products):
Product A
Product B
Product C
Product D
So to a product node I add for example:
Type A and Brand B
To another product node I add:
Type A and Brand C
And to another product node I add:
Type A and Brand C
Now when I click in the menu on type A, I want a view with:
Brand B
- product x
Brand C
- product x
- product x
How can I combine terms like this example in a view?
Views argument
Well, the instructions that I gave before still apply. But I think you want to add an argument to pass the Type term.
Add an argument for "Taxonomy: Term" or "Taxonomy: Term ID"
You can play around with the options if there is no default argument.
After adding this argument, you can pass the term id or term name to the view such as /product-list/TypeA or /product-list/TypeB
I already added an argument
I already added an argument of term id. That just works fine.
When I go the page/arg (arg = type 6) then only see the first term.
Type 6
- product node 1
- product node 2
- product node 3
- product node 4
And what I want is:
- Type 6
- Brand A
* product node 1
* product node 2
- Brand B
* product node 3
* product node 4
Brand A and Brand B are also terms
I tested this out in D6.
I tested this out in D6. Because of the way Taxonomy is handled, I think this may not be possible.
You might consider switching to D7 where taxonomies are handled as individual reference fields. I believe that you will be able to accomplish this in Drupal 7.
Thanks for pushing me in the
Thanks for pushing me in the right direction.
I accomplished it with an attached view to the main view.