From cd42770efe5917d3cc4fd6556351aca87c558642 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 16 Feb 2023 07:50:29 +0100 Subject: [PATCH] Provide routing for content elements Relates: #10349 --- Configuration/CeRouting.yaml | 27 ++++++++++++++++++++ Configuration/Routing.yaml | 1 + Documentation/Changelog/3.2.0.rst | 42 +++++++++++++++++++++++++++++++ ext_emconf.php | 2 +- 4 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 Configuration/CeRouting.yaml create mode 100644 Documentation/Changelog/3.2.0.rst diff --git a/Configuration/CeRouting.yaml b/Configuration/CeRouting.yaml new file mode 100644 index 0000000..3137846 --- /dev/null +++ b/Configuration/CeRouting.yaml @@ -0,0 +1,27 @@ +# Used for Content Elements = CE +# Works if they all use namespace "events" +routeEnhancers: + EventsDateShow: + type: Extbase + namespace: events + defaultController: 'Date::show' + routes: + - + routePath: '/{date}' + _controller: 'Date::show' + aspects: + date: + type: PersistedAliasMapper + tableName: tx_events_domain_model_date + routeFieldName: slug + EventsPagination: + type: Plugin + namespace: events + routePath: '/{localizedPage}-{currentPage}' + aspects: + localizedPage: + type: LocaleModifier + default: 'page' + localeMap: + - locale: 'de*' + value: 'seite' diff --git a/Configuration/Routing.yaml b/Configuration/Routing.yaml index 48fb177..0473f4d 100644 --- a/Configuration/Routing.yaml +++ b/Configuration/Routing.yaml @@ -1,3 +1,4 @@ +# Legacy, used for Plugins routeEnhancers: EventsDateShow: type: Extbase diff --git a/Documentation/Changelog/3.2.0.rst b/Documentation/Changelog/3.2.0.rst new file mode 100644 index 0000000..26dd41b --- /dev/null +++ b/Documentation/Changelog/3.2.0.rst @@ -0,0 +1,42 @@ +3.2.0 +===== + +Breaking +-------- + +Nothing + +Features +-------- + +* Provide routing for content elements. + Can be included within site configuration: + + .. code-block:: yaml + + imports: + - + resource: 'EXT:events/Configuration/CeRouting.yaml' + + Expects pluginNamespace to be "events": + + .. code-block:: typoscript + + view { + pluginNamespace = events + } + +Fixes +----- + +Nothing + +Tasks +----- + +Nothing + +Deprecation +----------- + +Nothing diff --git a/ext_emconf.php b/ext_emconf.php index 3bbad87..6c446fb 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -9,7 +9,7 @@ $EM_CONF['events'] = [ 'state' => 'alpha', 'createDirs' => '', 'clearCacheOnLoad' => 0, - 'version' => '3.1.0', + 'version' => '3.2.0', 'constraints' => [ 'depends' => [ 'typo3' => '10.4.00-11.5.99',