Feature: The route enhancer maps the filter 

Description 

The route enhancer of the Course List maps the category filter as well as the sorting, and translates the sorting values. It ships in Configuration/Routes/List.yaml, next to the route files of the other academic extensions. A site that imports the file gets readable list URLs in the language of the site:

/programs/filter/master-of-science-2/last-updated/desc
/de/studiengaenge/filter/master-of-science-2/zuletzt-aktualisiert/absteigend
Copied!

A filter alone, a sorting alone and both together each have a route of their own. The filter segment uses the CategoryFilterMapper aspect of category_types.

config/sites/my_site/config.yaml
imports:
  - resource: 'EXT:academic_programs/Configuration/Routes/List.yaml'

routeEnhancers:
  AcademicPrograms:
    limitToPages: [23]
Copied!

See Route enhancers, and Important: The route enhancer moved and translates its values for a site that imports the former file.

Impact 

  • Nothing changes for a site that imports neither file.
  • The filter adds no page cache entry: it is a dynamic argument, and the demand of the list is excluded from the cache hash.