Displaying facet block

Last updated on
30 April 2025

The facets are displaying in a block, named XC Facets. You should enable it before use at the Drupal block settings page (admin/build/block). Before that, however, you should go through the process of indexing settings (you should create facets from original fields, or index the original fields as text phrase or date), and the displaying facets settings.

If you have all things setup, the facets will be created, and your only task is to theming that. At display side we use the item_list theme for each facet fields.

theme_item_list($items = array(), $title  = NULL, $type = 'ul', $attributes = NULL)

We use only two parameters: the $items array contains the terms and number of occurence as link, and the $title is the label of the facet field, as it displayed on the XC search » indexing » Manage facets page (xc/search/indexing/facets). It is go through the t() function, so you can translate this string.

Help improve this page

Page status: Not set

You can: