Enables the possibility generating sanitized URL parts from persisted patterns.

Overview

#Persisted sanitized pattern mapping

What does it do?

Enables the possibility generating sanitized URL parts from persisted patterns.

How does it work?

Adds a new routing aspect extending the PersistedPatternMapper from TYPO3 core with sanitized URL parts.

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

As you can see, localization is respected, if needed.

Installation

Only install the extension and configure your persisted pattern mappers as described above.

You might also like...
A URL shortener with various other utilities, backed by a custom lightweight framework.

da.gd What is da.gd? da.gd is both a URL shortener and a collection of quick-info tools written in PHP. It allows you to use curl (or any http client)

Laravel URL Localization Manager - [ccTLD, sub-domain, sub-directory].
Laravel URL Localization Manager - [ccTLD, sub-domain, sub-directory].

Laravel URL Localization - (ccTLD, sub-domain, sub-directory). with Simple & Easy Helpers. Afrikaans Akan shqip አማርኛ العربية հայերեն অসমীয়া azərbayca

A simple but powerful URL shortener

UrlShorter 这是一个足够简洁的Url短网址生成器 This is a simple Url shorter. 兼容性 在PHP7.X 与 PHP 8.0 下测试通过 安装 step 1: git clone [email protected]:soxft/UrlShorter.git step

Checking an arbitrary URL for Micro-Framework HLEB

Checking an arbitrary URL for Micro-Framework HLEB The class RouteFinder is not included in the original configuration of the framework HLEB, so it mu

URL - link shortener based on sqlite
URL - link shortener based on sqlite

link-url-shortener url - link shortener based on sqlite.

URL shortener web application based on the Laravel PHP Framework.
URL shortener web application based on the Laravel PHP Framework.

UrlHub Warning: UrlHub is still in development, constantly being optimized and isn't still stable enough to be used in production environments. Whatev

The modern, privacy-aware URL Shortener built in PHP.
The modern, privacy-aware URL Shortener built in PHP.

About UrlHum UrlHum is a modern, privacy-aware and fast URL Shortener built with PHP and the Laravel Framework. At the moment UrlHum is heavily under

A modern, powerful, and robust URL shortener
A modern, powerful, and robust URL shortener

🚡 A modern, minimalist, and lightweight URL shortener. Polr is an intrepid, self-hostable open-source link shortening web application with a robust A

URL shortener web application based on the Laravel PHP Framework.
URL shortener web application based on the Laravel PHP Framework.

UrlHub Warning: UrlHub is still in development, constantly being optimized and isn't still stable enough to be used in production environments. Whatev

Comments
  • 404 when using locale map

    404 when using locale map

    I have configured the mapper as in the example described:

        type: PersistedSanitizedPatternMapper
        tableName: tx_extension_domain_model_info
        routeFieldPattern: '^(?P<path_segment>[\w-]+)-(?P<uid>\d+)$'
        routeFieldResult: '{path_segment|sanitized}-{uid}'
        localeMap:
          -
            locale: 'de_DE.*'
            field: path_segment
          -
            locale: 'en_GB.*'
            field: path_segment_en
    

    When I click on the english page the link leads to 404 error. The german version works fine. Do you have a hint what the problem could be?

    opened by klodeckl 5
  • Possible without uid in url?

    Possible without uid in url?

    I would like an url without the uid in the url, is that possible? I’m using the mapper just for the localeMap (I have an extension with one record for both languages english and german and an own slug field for each language). So in my case the PersistedAliasMapper would be fine but PersistedAliasMapper does not have the localeMap.

    opened by klodeckl 2
  • Class 'Calien\PersistedSanitizedRouting\Routing\Aspect\PersistedSanitizedPatternMapper' not found

    Class 'Calien\PersistedSanitizedRouting\Routing\Aspect\PersistedSanitizedPatternMapper' not found

    When using the extension I get the following error: Class 'Calien\PersistedSanitizedRouting\Routing\Aspect\PersistedSanitizedPatternMapper' not found

    I copied the mapper into my own extension and changed the namespace according to my extension and then it works. I tried different way in your ext_localconf.php but I was not able to find out the problem. Do you have an idea? I’m (still) on TYPO3 9 in non composer mode.

    opened by klodeckl 1
Owner
Markus Hofmann
Software developer, php and typo3 intented
Markus Hofmann
Um encurtador de URL's gratuito e Open source. Torne suas URL's um tanto pequenas forma rápida e gratuita

Slim Framework 4 Skeleton Application Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This app

Kilderson Sena 30 Jun 30, 2022
Laravel based API to shorten URLs and share them easily. Redirects to the real URL by entering a short URL generated by the API

URL Shortener Requirements: PHP 7.4 or above composer node / npm Installation clone the project from the Github repository, enter the project folder,

Julio Vergara 5 Nov 20, 2021
A laravel package for generating Bitly short URLs.

Laravel Bitly Package A laravel package for generating Bitly short URLs. For more information see Bitly Requirements Laravel 5.1 or later Installation

Wessel Strengholt 72 Nov 8, 2022
Purl is a simple Object Oriented URL manipulation library for PHP 7.2+

Purl Purl is a simple Object Oriented URL manipulation library for PHP 7.2+ Installation The suggested installation method is via composer: composer r

Jonathan H. Wage 908 Dec 21, 2022
:aerial_tramway: A modern, powerful, and robust URL shortener

?? A modern, minimalist, and lightweight URL shortener. Polr is an intrepid, self-hostable open-source link shortening web application with a robust A

Chaoyi Zha 4.6k Jan 1, 2023
A simple URL shortener for PHP

Shorty Shorty is a simple URL shortener for PHP. Installation 1. Download and extract the files to your web directory. 2. Use the included database.sq

Mike Cao 210 Dec 19, 2022
A fast and powerful URL Shortener built with Laravel, VueJS, and Tailwind CSS.

A fast and powerful URL Shortener built with Laravel, VueJS, and Tailwind CSS.

Devpri 53 Dec 25, 2022
Simpler Url Shortener for Laravel

Laravel Url Shortener Install composer require magarrent/laravel-url-shortener Run migrations: php artisan migrate Configuration If you want to config

Marc Garcia Torrent 51 Dec 17, 2022
A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own custom domain.

A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own custom domain. Table of Contents Full documentation Dock

null 1.7k Dec 29, 2022
🔗 Your Own URL Shortener

Your Own URL Shortener YOURLS is a set of PHP scripts that will allow you to run Your Own URL Shortener, on your server. You'll have full control over

YOURLS 8.8k Jan 3, 2023