Hi All
I'm a newbie to Drupal.
What is the purpose of hierarchy in taxonomy?
I had thought that if a vocabulary is hierarchical, clicking on a higher-level tag will display all posts with that tag AND child tags.
For example, if blog post "A" is tagged with the term "Banking" and blog post "B" is tagged with the term "Investment" and the term "Banking" is a parent of "Investment", then clicking on the "Banking" tag in Post "A" will display post "B" (as well as posts tagged with "Banking").
But obviously, this is not the case.
It seems that the purpose of hierarchy in taxonomy is only to make it easier for the poster to select the tag (in the select menu) when he is creating the content. Is this the case?
Thank you.
Gui
Comments
Hierarchy Taxonomy should display all child tags by default
Hi All
I think that hierarchy taxonomy should display all child tags by default.
That is, the link of a tag should be /taxonomy/term/7/all instead of just /taxonomy/term/7.
Can somebody shed some light on this?
How to tweak Drupal so that the tag that appears at the bottom of a post has the /all at the end to show all child tags?
And we shouldn't have to use Views or any other contrib modules to make this work.
Ok, there is the taxonomy multi module to do this, but it is still dev and doesn't seem to work.
In any case, shouldn't this be incorporated in the core taxonomy?
Thank you.
Gui
Yep, keep trying.
Well, you've found that the option is there. As an option.
Current behavior is that you get what you asked for, not what you asked for and a bunch of extra stuff.
There still needs to be a distinction between the specific term and that terms entire family. If you wanted to reverse the current situation, you would have to code in a new /taxonomy/term/7/only option to allow the normal behavior. That's just as messy.
I understand that you want something different, but changing core behavior for your current requirements (when they can be adequately met already) is not very likely. I can imagine an optional setting could be added in the future, if any other folk found it worthwhile. Maybe raise it as a feature request for D7, we are doing lots of things to taxonomy there.
Tweaking your links so that they always point to /all is probably the best way forward for you, so keep doing that.
In Drupal6, it looks like an implementation/override of taxonomy_term_path($term) would be the answer for you. Probably just 3 lines long. Give it a go.
.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Thank you Dan
Thank you Dan for the tip. I will look into it.
Actually the Taxonomy Multi module seems to do what I want, but unfortunately it changes the Select Box into a Auto-Complete box.
Viola! It works!
'href' => taxonomy_term_path($term) . "/all",
line 63 in taxonomy.module
Thank you once again.. I still think this should be the default behaviour.
line 63 in
ACK-- let's be clear here about what dan recommended: "implementation/override" and NOT a core module hack (which results in a fork of Drupal that will need to be manually maintained).
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
God forbid we break Drupal's
God forbid we break Drupal's one-click automatic upgrade procedure.
This hack is a small price to pay to have your software work as expected. Just make a HACKS.txt file so you can remember what you need to do again when you install the next version.
-zach
--
harkey design
: z
Another approach
One solution we're looking at is a patch that tags each node with all parent terms.
This gets around the display problem by making sure that each node is tagged correctly. Users can click on terms deep in the vocabulary without having to worry about control-clicking through all parent terms.
I think some help is needed to make this an optional behavior, and to port the patch to D7.
-
Doug Worsham
L&S Learning Support Services
UW-Madison
http://lss.wisc.edu/~doug