Project

General

Profile

Actions

Feature #90832

open

Resolve routePath by _aspects in Plugin RouteEnhancer

Added by Patrick Crausaz about 4 years ago. Updated almost 4 years ago.

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

0%

Estimated time:
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: 
            ...

Actions #1

Updated by Benni Mack almost 4 years ago

Hey Patrick,

thank you for your report. One could create an additional Enhancer to allow multiple routes - this is already possible in TYPO3 v9. I'd recommend you add this in a custom extension to ship such an enhancer?

Actions

Also available in: Atom PDF