1

Is it possible to add a class to my subterms in a taxonomy vocabulary? So I can style theme and indent them. This is my taxonomy vocabulary:

enter image description here

And in my front-end it looks like this:

enter image description here

I'd like to remove the "-" and give them a padding-left. But how can I do this?

I'm showing this as a term reference in my registration form shown as checkboxes.

7
  • how are you showing these in frontend, as a menu? Commented Jul 1, 2014 at 7:49
  • This is a term reference in my registration form shown as checkboxes.
    – nielsv
    Commented Jul 1, 2014 at 7:51
  • Can you just paste the markup for this list?
    – Chapabu
    Commented Jul 1, 2014 at 9:03
  • @nielsv which version of Drupal are you using? D7? Commented Jul 1, 2014 at 9:04
  • Im using drupal 7.
    – nielsv
    Commented Jul 1, 2014 at 9:18

1 Answer 1

2

If you're using them in a form you could use this module to have much more control of your checkboxes tree and you will have different classes for parents and children:

https://www.drupal.org/project/term_reference_tree

  1. Enable the Term Reference Tree module.
  2. Go to the Manage Fields tab of any fieldable entity (such as a content type, taxonomy term, or user.
  3. Add a new field with a type of Term Reference.
  4. In the widget select box, select Term reference tree.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.