- User interface
permet de renommer les labels des filtres de recherche
RC releases are not covered by Drupal security advisories.
Facets Custom Label module is a facet processor which lets you rename / relabel facets items.
- 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.
- Enable the module.
- Enable the facet processor Facets custom label processor.
- On each line, insert a replacement value as the following:
origindetermines the type of value to convert:
rto convert raw value,
dto convert the display value.
valuedetermines the value to convert.
new labeldetermines 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.
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
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.
- Drupal 8+, no planned port on Drupal 7.
- Facets: known to work with 1.0.0-beta2.
- Configuration translation: if you need translated labels.
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.
Toutes les informations proviennent du site drupal.org