Hello,
We needed to customize the look of facet categories in the guided search block, so we introduced the call of theming functions identified by the field name of the facet. If the theming function does not exist, the default theming is executed.
If you like to overwrite the default theming function for categories of a facet, write the following theme hook:
function theme_faceted_search_ui_categories_"your field identifier"($facet, $categories, $stage)
where "your field identifier" must be replaced with the name of your target facet.
Maybe this is useful for others, too, here are the changes in patch form and the modified module file itself.
Comments
Comment #1
David Lesieur commentedNote that this strategy could be implemented in a theme's own theme_faceted_search_ui_categories() function rather than patching Faceted Search UI.
However, the implementation is a bit hackish. It accesses a "private" attribute (_field) of the facet object and, moreover, that attribute is specific to CCK Facets (it won't work with other types of facets).
What I'd certainly like for the future, is a concept of widget for displaying a facet and its categories. Widgets would be selectable per facet in the faceted search environment, and the API would allow the implementation of new types of widgets.
Comment #2
David Lesieur commentedA good use case for the widget concept: Grouping categories into ranges of values.
Comment #3
David Lesieur commentedComment #4
lavanyadotr commentedHi,
I am using Faceted Search and Views for Display list of courses and course fees details.
In guided Search i get all fees details in a LIST format, Can i able to change it as SLIDER format as like attached image. So, that user can easily navigate.
Is i need to apply any themes in the function "theme_faceted_search_ui_categories_" you said, please any one guide me.