TYPO3 更改 slug 前缀
是否可以更改Slug场的前缀?有url https://www.example.com/myslug 。但应该是 https://www.example.com/page.com/page1/page1/page2/page2/myslug 。
我对此进行了扩展:
'appearance' => [
'prefix' => \VENDOR\EXT\UserFunctions\FormEngine\SlugPrefix::class . '->getPrefix'
],
看起来像这样:
use TYPO3\CMS\Backend\Form\FormDataProvider\TcaSlug;
class SlugPrefix
{
public function getPrefix(array $parameters, TcaSlug $reference): string
{
return '';
}
}
所以现在前缀为空了。如何设置URL的前缀?我在Typoscript设置中具有URL的ID。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论