Components
- Code
- Documentation
- Miscellaneous
- User interface
Documentation
Ecosystem
Licence
http://www.gnu.org/licenses/old-licenses/gpl-2.0.htmlpermet de renommer les labels des filtres de recherche
Release
RC releases are not covered by Drupal security advisories.
Covered by Drupal's security advisory policy
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.
- use
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.
Toutes les informations proviennent du site drupal.org