Show hierarchy in the taxonomy terms
cmgui - September 30, 2008 - 19:41
| Project: | Jump |
| Version: | 6.x-1.0 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Description
Hi Marcp
Thank you for coming up with this simple and wonderful module.
Is it possible to make the terms in the pull-down menu show in a hierarchical format.
That is, child terms will have a hyphen '-' in front.
See attached screen shot of the Taxonomy menu from Taxonomy Browser module.
Thank you.
Gui
| Attachment | Size |
|---|---|
| taxonomybrowser.jpg | 14.1 KB |

#1
Try replacing the line in the function
jump_menu_get_taxo_options()that says:$options[taxonomy_term_path($term)] = $term->name;with:
$options[taxonomy_term_path($term)] = str_repeat('-', $term->depth) . $term->name;...and let us know how it goes.
I'd like to generalize this out and make it easier to theme, but this is a start.
#2
hi marcp
it works!
thank you.
gui
#3
subscribing, and verifying this works as described.
It would be nice if the parents could be bolded, currently trying to figure this out.
#4
Hi marcp,
It's an old issue - and i often use Quick Menu instead (maybe would be good to merge efforts @ some point?).
Anyway, for now Jump has taxonomy support (unlike Quick Menu)... and the taxonomy list works better with your suggestion in #1
attaching a patch :)
#5
Confirming that the patch in #4 works like a charm. Correctly filters and displays hierarchical terms in Jump dropdown. You can see the proof in the pudding: http://www.cctcvambridge.org/welcome
Ready to be committed.
I'm about to open up a second issue for adding user prefs on how the Jump menu should be displayed.