{"id":21277974,"url":"https://github.com/b13/uniquealiasmapper","last_synced_at":"2025-07-11T08:32:17.742Z","repository":{"id":46354690,"uuid":"199390623","full_name":"b13/uniquealiasmapper","owner":"b13","description":"Unique Alias Mapper for URL Routing in TYPO3 v9+","archived":false,"fork":false,"pushed_at":"2021-10-21T14:01:24.000Z","size":20,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-09-18T14:31:39.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-29T06:18:44.000Z","updated_at":"2024-02-05T19:36:42.000Z","dependencies_parsed_at":"2022-08-29T22:41:12.944Z","dependency_job_id":null,"html_url":"https://github.com/b13/uniquealiasmapper","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Funiquealiasmapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Funiquealiasmapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Funiquealiasmapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Funiquealiasmapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b13","download_url":"https://codeload.github.com/b13/uniquealiasmapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225708281,"owners_count":17511635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T10:08:30.920Z","updated_at":"2024-11-21T10:08:31.419Z","avatar_url":"https://github.com/b13.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Unique Alias Mapper for URL Routing in TYPO3 v9+\n\nTYPO3 v9 comes with great ways to enhance URLs, called \"Enhancers\" for additions / suffixes for a page URL, and \"Aspects\" (and their special category \"Mappers\"), to transform a specific value back and forth between the application and the URL.\n\nThis extension ships with a new Mapper called `UniqueAlias`. It works similar to what people know from the `PersistedAliasMapper`, however when using TYPO3 installations, our projects mostly want:\n- to have the key unique, even if two records have the same title\n- everything special-chared and lower-case\n\n## Installation\n\nUse it via `composer req b13/uniquealiasmapper` or install the Extension `uniquealiasmapper` from the TYPO3 Extension Repository.\n\nOnce ready, you can configure the Mapper in your site configuration file.\n\n\n## Example with tt_address.company\n\nExample which maps `$_GET['addressid']` into a `/address/burger-king-germany` based on\nthe `company` field of `tt_address`.\n\n````yml\nrouteEnhancers:\n  AliasExample:\n    type: Simple\n    routePath: '/address/{partneralias}'\n    _arguments:\n      partneralias: addressid\n    aspects:\n      partneralias:\n        type: UniqueAlias\n        tableName: 'tt_address'\n        aliasField: 'company'\n        expires: '15d'\n        uniqueConfiguration:\n          fallbackCharacter: '-'\n````       \n\nIn the partial ListItem.html of `tt_address` the link could be generated this way:\n`\u003cf:link.page pageUid=\"{settings.singlePid}\" additionalParams=\"{addressid: address}\"\u003eDetails\u003c/f:link.page\u003e`.\n\nWith the Unique Alias Mapper, the URL will look like this: `https://example.com/my/page/address/burger-king-germany/`\n\nWith TYPO3's Core \"PersistedAliasMapper\" the URL will look like this `https://example.com/my/page/address/Burger%20King%20Germany/`.\n\nOn top, this Mapper comes with a caching layer in between, just like RealURL's \"uniqAlias\" feature did in the past.\n\nEven more complex route enhancers are possible too. An example for a link with a controller/action (Movie/show) of an\nextension `myext` where the uid is in the parameter `tx_myext_pi1[content]` and `title` is a column \nof `tx_myext_domain_model_content`:\n\n````yml\nrouteEnhancers:\n  MyextPlugin:\n    type: Extbase\n    limitToPages:\n      - 24\n    extension: Myext\n    plugin: Pi1\n    routes:\n      -\n        routePath: '/entry/{myext_title}'\n        _controller: 'Movie::show'\n        _arguments:\n          myext_title: content\n    defaultController: 'Movie::list'\n    aspects:\n      myext_title:\n        type: UniqueAlias\n        tableName: tx_myext_domain_model_content\n        aliasField: title\n        expires: 15d\n        uniqueConfiguration:\n          fallbackCharacter: '-'\n````  \n\n## ToDo\n\nThe expiration functionality does not cut it yet, so we need to improve this area. Pull Requests welcome.\n\n## Thanks\n\nThanks to the RealURL authors for providing such a good logic, which served as inspiration for this Mapper. On top, the creators of the Aspects/Mappers - thanks to them for providing such a flexible and extensible way for creating custom mappers and enhancers.\n\n## License\n\nAs TYPO3 Core, _uniquealiasmapper_ is licensed under GPL2 or later. See the LICENSE file for more details.\n\n## Authors \u0026 Maintenance\n\n_uniquealiasmapper_ was initially created for a customer project by Benni Mack for [b13, Stuttgart](https://b13.com).\n\n[Find more TYPO3 extensions we have developed](https://b13.com/useful-typo3-extensions-from-b13-to-you) that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Funiquealiasmapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb13%2Funiquealiasmapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Funiquealiasmapper/lists"}