Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.11
Component:
taxonomy data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Jan 2011 at 06:20 UTC
Updated:
18 Feb 2011 at 05:14 UTC
Ok I have a 2 tier taxonomy e.g:
- Business
- Politics
- Responsible Investing
- Living
- Home & Garden
- Art & Design
And nodes can be tagged by any combination of children.
In a view, I want to list All Parent Terms in a single row, for instance if a Node has the following Child Terms:
- Politics
- Responsible Investing
- Home & Garden
- Art & Design
Then the output I would desire is: "Business, Living"
I can't figure out a way to do this without merging about 2-3 separate views together (in my head). I don't want to go to that extent as I'm wondering if there's a better or "correct" way to do it?
Thanks for any advice :)
Comments
Comment #1
iamjon commentedcarn1x,
can you provide step by step instructions of what you're trying to achieve, i don't really understand the question.
Comment #2
carn1x commentedOh I ended up solving this with a custom module, sorry should have closed it.
I just re-read my post and realized the formatting was lost which probably didn't help any lack of replies for over a month!
Never mind, thanks for the interest to help!
Comment #3
carn1x commentedComment #4
iamjon commentedcarn1x,
Thanks for the update, if possible can you post your solution so others can benefit.
Comment #5
carn1x commentedI just made a custom module which provides a function which I'm using at the theme level to take the nid and then output the term parents of a hardcoded taxonomy ID. My code is not reusable unless you're prepared to modify it, but here it is:
In the theme ($output is the nid supplied by a view field):
In the custom module: