Faceted navigation categories - preserving case

Managed by | Updated .


Funnelback will lowercase all the category names of metadata-based facets - so all facets based on metadata will display with lower case names by default.

This is due to the fact that metadata fields often contain case-variants of field values.  By treating the values as case insensitive, all the items tagged with the same term can be counted together.

There are a couple of approaches which can be used to ensure that the facets are not fully lowercase.

Case sensitive facet categories

When working with web pages that used controlled metadata sources it is save to treat the values as case sensitive which means you can preserve the case when you print out the values.

A controlled metadata source usually means that a user must lookup the keyword when applying the tag to an item - this prevents variations on the keywords be applied as tags to a page.

There is a presentation option that instructs Funnelback to treat metadata as case sensitive (for the purpose of faceted navigation only).

To apply this to a collection add -rmc_sensitive=true to the query processor options for the collection being queried (this is the same collection that has the faceted navigation defined on it and is often a meta collection).

This is done by setting the query processor option -rmc_sensitive=true to the collection.cfg, either by editing the collection.cfg and adding the option, or by editing the collection settings and adding the option on the interface tab.

As soon as this value is set the faceted navigation categories will preserve their case, however note that because the categories are now case sensitive you may see duplication as a result of variation in the case used (eg. Category != category)

Use CSS styling

An alternative that can provide some capitalisation to faceted navigation categories is to use CSS to introduce some capitalisation to the categories that are printed.

This approach works well if you can't make the categories case sensitive using the option above, but still want some capitalisation applied to the presentation of the categories.  This doesn't preserve the case used for faceted navigation but can often provide the desired effect.

This also won't work very well if capitalisation needs to be applied selectively (e.g. for an acronym).

To apply CSS based capitalisation add a text-transform CSS rule to your stylesheet similar to:

li.category { text-transform: capitalize; }
Was this artcle helpful?

Type: Keywords:
Features: Frontend > Faceted navigation