In strictly hierarchical systems (vocabularies) only the lowest level of hierarchy are meant to have own items.
Could we have this option in this module, that while editing a node with ct field, the whole or part of a tree of a vocabulary will be displayed, but only lowest terms can be checked or select.
a) If "Depth of taxonomy tree:" =empty the lowest level
b) if "Depth of taxonomy tree:" = p.e. 1 only first level
for example:
vocabulary
- parent1
-- term 1-1
-- subterm 1-1
-- term 1-2
-- subterm 1-2
-- term 1-3
-- subterm 1-3
- parent2
-- term 2-1
In case a) all subterms and term 2-1 could be be checked or select.
in case b)
"Depth of taxonomy tree:" = 1 all terms 1- and terms 2- could be chosen
"Depth of taxonomy tree:" = 0 only parent items are aktive.
With the current options users could check or chose any of the displayed terms (or not? Am I overlooking a way to change that?)
Together with the taxonomy menu module (version3 in preparation) this could be a great feature to have clear menu and content structure.
See: http://drupal.org/project/taxonomy_menu
Thanks - content taxonomy is a great module!!
Klaus
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | content_taxonomy_tree_addons_0.1.tar_.gz | 1.31 KB | grzegorz.bartman |
Comments
Comment #1
ksc commentedNobody else is supportung this idea?
It is about letting users only check lowest level in hierarchical taxonomy.
Comment #2
ksc commentedComment #3
janusman commentedI am trying to get this done in the 5.x version. I could report back with a patch for that that'd hopefully work in the 6.x version.
Comment #4
janusman commentedFor a clue, see http://drupal.org/node/76500
The key (I think!) is using the optgroup facility in #options arrays in Form API. Instead of having an option tree:
you need to make an array of arrays of options:
You could do this using hook_form_alter() from another module, or we could work it into this module (I will try the first thing first).
Comment #5
janusman commentedSadly, Form API does not allow nested optgroups, that is, we can only make optgroups for the first-level terms. I have this working under version 5.x-1.x-dev, ugly ugly code follows.
To get it to work you have to specify a negative depth (instead of "2" you say -2 to have this patch kick in).
Comment #6
upupax commentedsubscribing.
but I can't apply the above patch to last -dev package, I get error: malformed patch at line 4.
Comment #7
ksc commentedHi janusman, thanks for your mailing the code.
I´m not into PHP and I use Drupal 6.
Comment #8
ksc commentedAs an option for "only lowest level terms are selectable" I suggest the function:
"Parental terms automatically get selected".
This would make it easier to use hierarchical path structures within the Taxonomy Menu module.
Please see: http://drupal.org/node/428004
Comment #9
ksc commentedI found out that http://drupal.org/project/hierarchical_select can do that.
Unfortunately it can´t beeing used yet within content taxonomy.
Comment #10
janusman commented@ksc: Hierarchical Select support is moving closer =)
Check out: #342992: Port HS support for Content Taxonomy to Drupal 6
Comment #11
janusman commentedClosing due to HS support now solved.
Comment #12
grzegorz.bartman commentedThis is simple module, that disable checkbox on parents in Content Taxonomy Tree module
This is dev version.
Comment #13
lhugg commentedI don't see that this did anything after it was installed. No extra checkboxes. I'm using Drupal 6.16. Is there any documentation for this module?
Comment #14
lhugg commentedComment #15
halmsx commentedthanks for the module!