Project

General

Profile

Actions

Feature #90130

open

Introduce option for syncing fields with slug in TCA type "slug"

Added by Christian Eßl over 4 years ago. Updated about 4 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2020-01-16
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I propose a new option for the "generatorOptions" config in a TCA slug type to automatically sync changes made in one of the configured fields with the slug. (defaulting to false)

'type' => 'slug',
    'config' => [
        'generatorOptions' => [
            'fields' => ['title'],
            'sync' => true,
            'replacements' => [
                '/' => ''
            ],
        ]
        'fallbackCharacter' => '-',
        'prependSlash' => true,
        'eval' => 'uniqueInPid'
    ]

So if "sync" is set to true, changing the "title" field in a backend form would automatically trigger a "recreate" for the connected slug, to keep the changes in sync.

Actions

Also available in: Atom PDF