Changing Funnelback facets form control type

Hi

 

How do you change the type of input which is used for facets?  For example if a facet is using a radio button, how do change to checkbox?

 

Thanks

Moved this to the Funnelback forum so that the watchers in here can help out. 

Hi Gavin121 -

 

There's a lot more to this question than you may think - Funnelback's default template (simple.ftl) outputs facets as link-based, single-select operations, with an optional hierarchical structure.

 

If you're proposing moving to a checkbox arrangement, you have some additional considerations:

  1. Can several categories in a checkbox be selected simultaneously (i.e. a multi-select)
    1. If not:
      1. Will the results page refresh on an onChange behaviour, or is a separate 'Submit' button required?
      2. Are these true checkboxes, or pseudo checkboxes styled as such?
      3. Will non-selected sibling categories persist in the display?
    2. If so:
      1. Will categories that have no matching results be displayed?
      2. Will categories be ANDed or ORed together in a given facet?
      3. Will categories from sibling facets be ANDed or ORed together?
      4. Will category counts need to be displayed?
      5. Can all selected categories within a facet be deselected?

Hierarchical multi-select checkbox facets are generally not recommended, due to the UI and UX complexity involved.

 

It's entirely possible that you may not want facets at all - a parametric filtering may be more appropriate (e.g. "Show Only:  Downloads | Web Pages | All"), depending on your goals.

 

Once you've confirmed your goals, you have several options:

  • Access the Funnelback data model directly (either /s/search.json or /s/search.xml) and re-implement the simple template behaviour in a template language of your choice
  • Create standalone Funnelback freemarker macros (e.g. $SEARCH_HOME/conf/COLLECTION/_default/my_facets.ftl) that modify the behaviour of faceted navigation output to produce your markup of choice (you'll want to focus your efforts on $SEARCH_HOME/web/templates/modernui/funnelback*.ftl

See also:

Thanks for that answer.  Do you have any examples of creating standalone funnelback freemarker macros?  here is an example I am using within the .ftl

 

            <h3>Short courses</h3>
             <@fb.MultiFacet name="Short_courses">
                  <@fb.MultiCategories facet=fb.facet />
              </@fb.MultiFacet>
 
Still spits out a radio button instead of a checkbox...  

I've implemented facets as checkbox (with ajax reloading) on our website. 

Example: http://www.aqa.org.uk/professional-development/course-search

 

 

Take a look to see the behaviour.