calien/extended-routing

Extended Routing Mappers for TYPO3

Maintainers

👁 calien666

Package info

github.com/calien666/typo3-extended-routing

Type:typo3-cms-extension

pkg:composer/calien/extended-routing

Statistics

Installs: 1 545

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 2

1.0.0 2022-04-07 08:06 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 57b259e0b4fdbdb87f2d05b145fc6968b9193701

  • Markus Hofmann <typo3.woop@calien.de>

routingtypo3

This package is auto-updated.

Last update: 2026-06-05 09:42:10 UTC


README

#Extended Routing Aspects

What does it do?

Adds some more Mappers for Routing Aspects feature in TYPO3.

How does it work?

With four new Routing aspects you can handle more possibilities for advanced routing in TYPO3.

The mappers

DateTimeMapper

Allows you to create customized url parts including localization to get DateTime values inspeaking parts without using a dataset with defined slug.

Archive:
 type: Extbase
 extension: News
 plugin: Archive
 routes:
 - routePath: '/{day}'
 _controller: 'Archive::list'
 _arguments:
 day: day
 defaultController: 'Archive::list'
 aspects:
 day:
 type: DateTimeMapper
 format: Y-m-d
 localeFormat:
 -
 locale: 'de_.*'
 format: d-m-Y

PersistedSanitizedPatternMapper

Adds a new routing aspect extending the PersistedPatternMapper from TYPO3 core with sanitized URL parts. Localization is respected, if needed.

aspects:
 country:
 type: PersistedSanitizedPatternMapper
 tableName: static_countries
 routeFieldPattern: '^(.*)-(?P<uid>\d+)$'
 routeFieldResult: '{cn_short_de|sanitized}-{uid}'
 localeMap:
 - locale: 'de_*'
 field: cn_short_de
 - locale: 'en_*'
 field: cn_short_en
 territory:
 type: PersistedSanitizedPatternMapper
 tableName: static_territories
 routeFieldPattern: '^(.*)-(?P<uid>\d+)$'
 routeFieldResult: '{tr_name_de|sanitized}-{uid}'
 localeMap:
 - locale: 'de_*'
 field: tr_name_de
 - locale: 'en_*'
 field: tr_name_en

PersistedDisabledAliasMapper

Allows creating full URLs for disabled elements by TCA enablecolumns. Helpful, if you have to create the URLs before publishing the record. Usage as the default PersistedAliaMapper.

News:
 type: Extbase
 extension: News
 plugin: news
 routes:
 -
 routePath: '/{title}'
 _controller: 'News::single'
 _arguments:
 title: news
 aspects:
 title:
 type: PersistedDisabledliasMapper
 tableName: tx_news_domain_model_news
 routeFieldName: path_segment

PersistedNullableAliasMapper

Allows a default value for normally aliased URL path segment. For example, a news without category, but URL part is defined with category.

News:
 type: Extbase
 extension: News
 plugin: News
 routes:
 -
 routePath: '/{category}/{title}'
 _controller: 'News::single'
 _arguments:
 category: category
 title: news
 aspects:
 category:
 type: PersistedNullableAliasMapper
 default: 'no-category'
 tableName: tx_news_domain_model_category
 routeFieldName: path_segment
 title:
 type: PersistedAliasMapper
 tableName: tx_news_domain_model_news
 routeFieldName: path_segment

Installation

Possible via extensions.typo3.org, ZIP upload or composer.

Extension Repository

https://extensions.typo3.org/extension/extended_routing

Composer

composer require calien/extended-routing