1

我使用扩展生成器创建了一个扩展和插件,它生成一些 HTML 代码到一个文件中fileadmin/templates/List.html。这个内容进入我的网页的 template.html 作为

<f:section name="some-content">
<f:format.html> {some_content} </f:format.html> 
</f:section>

some_content 来自我的 Typoscript 模板

some_content < styles.content.get
some_content.select.where = colPos = 1

该插件是从后端布局附加的

问题是在我的 HTML 页面中,我在<p>标签中获取插件信息

<p class="bodytext">&nbsp;</p>
<p class="bodytext">    <!--  CONTENT ELEMENT, uid:260/list [begin] --></p>
<p class="bodytext">&nbsp;</p><div id="c260" class="csc-default"><p class="bodytext">&nbsp;</p>
<p class="bodytext">        <!--  Plugin inserted: [begin] --></p>
<p class="bodytext">&nbsp;</p>
<p class="bodytext">        <!--  Plugin inserted: [end] --></p>
<p class="bodytext">&nbsp;</p></div><p class="bodytext">    <!--  CONTENT ELEMENT, uid:260/list [end] --></p>
<p class="bodytext">&nbsp;</p>

这弄乱了我的 CSS。

4

3 回答 3

5

<f:format.html>使用 RTEparser 解析其中的内容。每个新行都将用p-tag 包裹。

用于<f:format.raw>避免 HTML 转义。

于 2013-05-15T15:48:12.307 回答
2

在根的模板脚本中添加以下行

在常量中:

content.RTE_compliant = 0

在设置中:

tt_content.stdWrap.dataWrap >
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines>
于 2014-02-12T09:44:11.750 回答
2

正如您想使用的<f:format.html>那样,我更愿意继续使用它,但使用它的 parseFunc 属性。

<f:format.html parseFuncTSPath="">{some_content}</f:format.html>

您可以在那里分配解析功能。(空值忽略标准行为和 P 标签的默认显示。

于 2019-10-28T16:46:04.190 回答