【发布时间】:2017-09-19 17:14:18
【问题描述】:
在 7.6 之前的 TYPO3 版本中,可以使用 TypoScript 在内容元素 HTML 内呈现链接
tt_content.html.parseFunc.tags.link < lib.parseFunc.tags.link
这在 7.6 之后不再起作用。怎么解决?
【问题讨论】:
标签: typo3 typoscript typo3-7.6.x
在 7.6 之前的 TYPO3 版本中,可以使用 TypoScript 在内容元素 HTML 内呈现链接
tt_content.html.parseFunc.tags.link < lib.parseFunc.tags.link
这在 7.6 之后不再起作用。怎么解决?
【问题讨论】:
标签: typo3 typoscript typo3-7.6.x
如果你使用fluid_styled_content,覆盖HTML.html并希望使用表单和将Typo3链接标签<link>text</link>转换为html链接,你将不得不使用这个(至少这个有效对我来说,两个自定义 html 表单都可以正常工作,并且链接已转换):
<f:format.htmlentitiesDecode>
<f:format.html parseFuncTSPath="lib.parseFunc">
{data.bodytext}
</f:format.html>
</f:format.htmlentitiesDecode>
【讨论】:
lib.parseFunc.htmlSanitize = 0(参见 docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5.x/…)
这个问题有几个可能的解决方案。
1.) 使用 fluid_styled_content。
我猜现在使用的是fluid_styled_content 而不是css_styled_content。因此使用的 TypoScript 不再起作用。一个有效的解决方案是切换回 css_styled_content。但是,这是古老的方式,对于较新的项目,您不应该这样做。
2.) 覆盖fluid_styled_content的模板。
如果你打开fluid_styled_content的模板和HTML元素,在typo3/sysext/fluid_styled_content/Resources/Private/Templates/Html.html你会看到
<f:format.raw>{data.bodytext}</f:format.raw>
这个必须改成
<f:format.html>{data.bodytext}</f:format.html>
【讨论】: