1 year ago
#372923
180690
TYPO3 change slug prefix
Is it possible to change the prefix of the slug field? There is the url https://www.example.com/MYSLUG. But it should be https://www.example.com/page1/page2/MYSLUG.
I've extended the TCA with this:
'appearance' => [
'prefix' => \VENDOR\EXT\UserFunctions\FormEngine\SlugPrefix::class . '->getPrefix'
],
and it looks like this:
use TYPO3\CMS\Backend\Form\FormDataProvider\TcaSlug;
class SlugPrefix
{
public function getPrefix(array $parameters, TcaSlug $reference): string
{
return '';
}
}
So now the prefix is empty. How can I set the prefix to an URL? I have the ID of the URL in the typoscript setup.
typo3
slug
0 Answers
Your Answer