[英]How to make a working link in a template file with FlexForm and <f:link.typolink>?
The FlexForm allows the user to select a page in the backend. FlexForm允许用户在后端选择页面。
This way I get the page into the template. 这样我就可以将页面放入模板中。 With this link I would like to form a link in a template file
通过此链接,我想在模板文件中形成一个链接
The problem: The following value is passed to me by the user input and FlexForm: How can I build a valid link from it? 问题:用户输入和FlexForm将以下值传递给我:如何从中构建有效的链接?
impressumSite => 'pages_26'
FlexForm: 柔性成型:
<settings.impressumSite>
<label>Some Text/label>
<config>
<type>group</type>
<internal_type>db</internal_type>
<allowed>pages</allowed>
<size>1</size>
<maxitems>1</maxitems>
<minitems>1</minitems>
<show_thumbs>1</show_thumbs>
<wizards>
<suggest>
<type>suggest</type>
</suggest>
</wizards>
</config>
</settings.impressumSite>
Template: 模板:
<f:link.typolink parameter="{settings.impressumSite}">some text</f:link.typolink>
I also tried f.link.page
. 我也试过
f.link.page
。 Problem here: An explicit UID is required. 问题在于:需要显式的UID。
Debug result for {settings.impressumSite} impressumSite => 'pages_26'
{settings.impressumSite}的调试结果
impressumSite => 'pages_26'
Thank you very much for helping 非常感谢您的帮助
<f:link.typolink parameter="{settings.impressumSite}">some text</f:link.typolink>
应该做的伎俩
You could use a viewhelper as a workaround https://fluidtypo3.org/viewhelpers/vhs/2.1.2/Iterator/ExplodeViewHelper.html 您可以使用viewhelper作为解决方法https://fluidtypo3.org/viewhelpers/vhs/2.1.2/Iterator/ExplodeViewHelper.html
By the way, which TYPO3 version do you use? 顺便问一下,你使用哪个TYPO3版本? I just checked flexform settings in a V8 installation.
我刚刚检查了V8安装中的flexform设置。 In my case the value only contains the uid (same flexform config as yours)
在我的情况下,该值仅包含uid(与您的配置相同的flexform配置)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.