Route Enhancers

To get speaking URLs it's necessary to add a Route Enhancer for the detail view.

Be aware that you need to adapt the limitToPages entry.

config/sites/<your-site>/config.yaml
routeEnhancers:
  CartProducts:
    type: Extbase
    limitToPages:
      - 123
    extension: CartProducts
    plugin: ShowProduct
    routes:
      - routePath: '/{product-title}'
        _controller: 'Product::show'
        _arguments:
          product-title: product
    defaultController: 'Product::show'
    aspects:
      product-title:
        type: PersistedAliasMapper
        tableName: tx_cartproducts_domain_model_product_product
        routeFieldName: path_segment
Copied!