Active
Project:
Content Taxonomy
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2008 at 21:05 UTC
Updated:
1 Mar 2010 at 22:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
sprugman commentedFWIW, my goal was to get 5 columns, one for each top-level term, instead of a big long list with 25 items. For anyone else who's interested in this, here's how I'm handling it at the moment:
First I tried to use form_alter, to add some divs around each parent and it's children, but I guess I don't understand how cck forms are built well enough to do that at the moment. Instead, I used the tree sub-module, and set it to "always expanded". Then in my admin theme, I added this css:
This allowed me to hide the images and expand collapse trigger. The #field-myField-tax-value-wrapper selectors are just to keep my changes local to this particular field. Also, if you don't have any Help text for the field, you'll have to come up with some other way from keeping the next field from merging into this one.
HTH
Comment #2
capellic@sprugman: That's an interesting solution. Maybe I'll give that a shot.
And I'll echo the need for some hierarchical div wrappers. I am able to achieve the following (image attached) with the Taxonomy Super Select module, but would like to be able to use CCK with my taxonomy.
Comment #3
capellicI ended up following @sprugman's lead installed Taxnonomy Manager and enabled Content Taxonomy Tree. Out of the box, Content Taxonomy Tree looks pretty nice. I've attached a screenshot.
Then I did some CSS of my own to get the desired, nested affect. Note that I removed the input field for the first tier terms because I want users to only select tier two. I also made tier one bold and tier two floating to save on vertical space. Here's the CSS I used along with a screenshot of the result. (Note that the font-face and all-caps seen in the screenshot are not included in this CSS.)
#field-myfieldname-value-wrapper .treeview .form-item label.option { font-weight: bold; }
#field-myfieldname-value-wrapper .treeview .treeview .form-item label.option { font-weight: normal; float: left; margin-right: 10px; }
#field-myfieldname-value-wrapper .lastCollapsable, #field-toi-value-wrapper .collapsable { clear: both; }
#field-myfieldname-value-wrapper .treeview .form-item input { display: none; }
#field-myfieldname-value-wrapper .treeview .treeview .form-item input { display: inline; }
#field-myfieldname-value-wrapper .treeview .collapsable { background:none }
#field-myfieldname-value-wrapper .treeview .last { background-image:none }
#field-myfieldname-value-wrapper ul.treeview li { background:none }
#field-myfieldname-value-wrapper .hitArea { display:none }
#field-myfieldname-value-wrapper .description { clear:both; padding-top:1em; }
Comment #4
magnus commentedI used Taxonomy Super Select before and liked the way it output the terms. I guess I will have to use this aproach to be able to get it again with Content Taxonomy.
Thanks for the code!
Would be great if something like this would get into Content Taxonomy without the need to install Content Taxonomy Tree module.