2

I have an exposed taxonomy term filter with values of "true" and "false". I would like to simply rename the options to "yes" and "no".

I can't simply change the taxonomy tern name since I am importing the values from a XML file.

How would you suggest I do this? Is there a simple CSS rewrite - changing true to yes, and false to no? Is there a field theme function I should use?

Thanks for any help.

  • Can you go in the .module file pertaining "true"/"false" and find the values t(true) and t(false)? That can be a dirty fix, but it works. – Graham Jul 21 '11 at 17:01
1

The easiest way is to use hook_form_alter to alter the names displayed in the options.

An alternative and a bit more tricky way, is to create your own views_filter_handler for them term used in the view, and customize how the exposed filter form should look like. This is a good solution if you are creating many views and want a single place to do the alterations. See How do I add dropdowns in Filter Criteria in Views module? for more info.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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