Feature #90832

Resolve routePath by _aspects in Plugin RouteEnhancer

Added by Patrick Crausaz 13 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2020-03-26
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

With the "type: Extbase" Route Enhancer, it is possible to have various URL paths by mapping an "_arguments" to a "_controller".

  routes:
      - { routePath: '/list/{page}', _controller: 'News::list', _arguments: {'page': '@widget_0/currentPage'} }
      - { routePath: '/tag/{tag_name}', _controller: 'News::list', _arguments: {'tag_name': 'overwriteDemand/tags'}}

With "type: Plugin" it is not possible to create various routes.
A possible configuration would be to map an aspect to the path:

SomePlugin:
    type: Plugin
    routes:
        - { routePath: "/{producer}", _aspect: { "producer": "producer" } }
        - { routePath: "/{category}", _aspect: { "category": "category" } }
        - { routePath: "/{producer}/{category}", _aspect: { "producer": "producer", "category": "category" } }
    namespace: "tx_ext_pi1" 
    aspects:
        producer:
            ...
        category: 
            ...

Also available in: Atom PDF