pagemachine / typo3-flat-urls
Flat URLs (like Stack Overflow) for TYPO3
Installs: 27 600
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 6
Forks: 2
Open Issues: 5
Type:typo3-cms-extension
Requires
- php: ^8.0
- doctrine/dbal: ^2.0 || ^3.0
- psr/http-message: ^1.0 || ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^1.0 || ^2.0 || ^3.0
- symfony/console: ^5.4 || ^6.4
- typo3/cms-backend: ^11.5 || ^12.4
- typo3/cms-core: ^11.5 || ^12.4
- typo3/cms-extbase: ^11.5 || ^12.4
- typo3/cms-fluid: ^11.5 || ^12.4
- typo3/cms-frontend: ^11.5 || ^12.4
- typo3/cms-redirects: ^11.5.7 || ^12.4
Requires (Dev)
- ergebnis/composer-normalize: ^2.8
- friendsofphp/php-cs-fixer: ^3.41
- jangregor/phpstan-prophecy: ^1.0.0
- php-parallel-lint/php-console-highlighter: ^1.0.0
- php-parallel-lint/php-parallel-lint: ^1.2
- phpspec/prophecy-phpunit: ^2.0
- phpstan/phpstan: ^1.0.0
- phpunit/phpunit: ^9.0
- sclable/xml-lint: ^0.6.0
- typo3/coding-standards: ^0.7.1
- typo3/testing-framework: ^7.0
Replaces
- typo3-ter/flat-urls: 3.1.3
- dev-master
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.1.1
- 1.1.0
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-renovate/typo3-testing-framework-9.x
- dev-functional-test-package-names
- dev-renovate/phpstan
- dev-renovate/doctrine-dbal-4.x
- dev-renovate/typo3-coding-standards-0.x
This package is auto-updated.
Last update: 2024-11-15 07:46:22 UTC
README
Flat URLs (like Stack Overflow) for TYPO3
Installation
This extension is installable from various sources:
-
Via Composer:
composer require pagemachine/typo3-flat-urls
-
From the TYPO3 Extension Repository
-
From Github
Purpose
The purpose of this extension is to enforce so called "flat URLs" throughout the TYPO3 frontend. Thus instead of my/deeply/nested/page/
you will always get URLs like 10/page/
(thus page UID and title), no matter the actual page hierarchy managed in the backend.
Page translations will use the same UID as their original page but with translated titles. Thus you need to make sure that the language parameter (_language
) is part of the URL to avoid duplicate URLs with multiple translations.
For flat URLs this extension manages the slugs of pages, thus these are not editable anymore. Whenever a page is edited the slugs are updated automatically so they stay in sync with their related fields (title by default). If a page slug changes, a redirect is added automatically. Conflicting redirects when changing slugs back and forth are removed to ensure pages are always accessible.
Similar to Stack Overflow pages requested only by page UID will be redirected to their full URL. This means that e.g. https://example.org/10/ redirects to https://example.org/10/page/. This also works for translations.
Command
If you have existing pages when adding this extension or if you want to ensure a clean state you can run the slugs:update
CLI command. It will update the slugs of all pages and page translations.
Testing
All tests can be executed with the shipped Docker Compose definition:
docker compose run --rm app composer build