v1/web/modules/contrib/facets_short_pretty_paths
Gdilove 927f32325b 初始化 2023-11-13 20:36:13 +08:00
..
src 初始化 2023-11-13 20:36:13 +08:00
LICENSE.txt 初始化 2023-11-13 20:36:13 +08:00
README.md 初始化 2023-11-13 20:36:13 +08:00
composer.json 初始化 2023-11-13 20:36:13 +08:00
facets_short_pretty_paths.info.yml 初始化 2023-11-13 20:36:13 +08:00
facets_short_pretty_paths.install 初始化 2023-11-13 20:36:13 +08:00
facets_short_pretty_paths.module 初始化 2023-11-13 20:36:13 +08:00
facets_short_pretty_paths.services.yml 初始化 2023-11-13 20:36:13 +08:00

README.md

Shortens Facets Pretty Paths:

  • Removes the term ids from the term aliases. If a machine name is not available yet, there is a fallback to the default term coder, with the term id, to guarantee unicity.
  • Multiple values (Facet items) are delimited by a dot, the Facet alias is present only once.

So we have e.g.: /color/black.yellow.red instead of /color/black-1/color/yellow-2/color/red-3

Dependencies

Configuration

To comply with the previous required dependency, the default taxonomy field name used for the path resolution is the base field definition from Taxonomy Machine Name: machine_name.

If you wish to use another one, it can be overridden as $settings['facets_short_pretty_paths_field_name'] = 'field_name';

A contributed solution has been favoured to a patch as

Roadmap

  • Make the facet items delimiter configurable