1

a view with content type as select list

The above view shows articles content type, which is exposed filter.I want to add a radio buttons as i have shown in image for published and unpublished,can I get this functionality programmaticaly and how

2 Answers 2

1

This can be achieved using Better Exposed Filters module. If you need to do this programmaticaly then you may need to look at the code of this module. You need to implement the hook_theme as done in better_exposed_filters.module and implement the code to display as radio button as done in better_exposed_filters.theme(Function: theme_select_as_radios)

I would suggest using the module directly if that is an option.

1
  • Agree. This module will let you change the Selector Yes/No which exposed filters will give you by default for Content: Published filter. If that is what you are needing (which is what your graphic suggests) then it could be a useful solution Commented Mar 25, 2015 at 19:10
0

I would suggest using Views Bulk Operations:

This module augments Views by allowing bulk operations to be executed on the displayed rows. It does so by showing a checkbox in front of each node, and adding a select box containing operations that can be applied. Drupal Core or Rules actions can be used.

Even if it can't do exactly what you want, you could modify it into a custom module that could. Gives a good starting point for the code.

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.