Closed (won't fix)
Project:
Tapatio
Version:
5.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Sep 2009 at 03:38 UTC
Updated:
18 Sep 2009 at 21:10 UTC
It would be nice to have a theme where group tags are seperated by colors.
Comments
Comment #1
evoltech commentedThere is a much more elegant way to do this in drupal 6, but in drupal 5 I don't know how to do this whith out hacking some theme code (please correct me if there is a way to do this in the module).
That being said you can accomplish this by adding the following theme code to your template.php file:
What you see here is us overriding the the theme_select() function (declared in includes/form.inc). theme_select relies on a helper function called form_select_options() which we call unless this is for the comms_group_tag section. If this is for the comms_group_tag section then we will add in background style for the option depending on wether or not it is a new term section. Here a term section is defined as any new parent-less term (the taxonomy module gives us terms prefixed with "-" if it is a child of the previous term).