Module Description
Facets Custom Label module is a facet processor which lets you rename / relabel facets items.

Features
* Relabels facets by:
* their raw value: machine name or content IDs,
* their display value: content titles, term names.



2.0 new features

* Label replacements are now interpreted as HTML, so you may now include markup.

Basic usage
* Enable the module.
* Enable the facet processor Facets custom label processor.
* On each line, insert a replacement value as the following: <origin>|<value>|<new label>
* origin determines the type of value to convert:
* use r to convert raw value,
* use d to convert the display value.


* value determines the value to convert.
* new label determines the final display name.


* (optional) If you need translated labels, enable the Configuration Translation module and translate the facet configuration.

Please note this processor will convert facet names in a single pass. For each result, it will attempt to convert using the raw mapping first, then the display mapping if not matching. Values which are not converted are left unchanged.

Examples Relabel content types by their machine name
r|article|Awesome articles r|event|Events r|another_content_type|Others Relabel terms using a mix of ID and names
r|156|Label of term 156 r|1337|Label of term 1337 d|Dog|New label of dog Caveats You should not use auto incremented numeric entity IDs (like term or node IDs) if you plan to have a deployment scenario where those IDs will not match between the instances. You better have to use their name / title or another technical field.

Requirements
* Drupal 8+, no planned port on Drupal 7.
* Facets: known to work with 1.0.0-beta2.
* Configuration translation: if you need translated labels.

Similar modules Search API Value Mapping
You can achieve similar results by using Search API Value Mapping. Instead of altering the label on facet's end, you alter the index by using a Search API processor, which adds a field using another field value.

Facets Custom Label does not require a reindex to work.

Link: https://www.drupal.org/project/search_api_mapping

Project Usage
826
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
Facets Custom Label module solves the problem of renaming or relabeling facets items based on their raw or display values.
Data Name
facets_custom_label

OPENAI CHATBOT

OPENAI CHATBOT

12:21:17
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.