【问题标题】:Parse Powermail 2.x Fields HTML in Email Output (TYPO3 6.2.x)解析电子邮件输出中的 Powermail 2.x 字段 HTML (TYPO3 6.2.x)
【发布时间】:2015-06-05 09:35:52
【问题描述】:

在 TYPO3 6.2.x 中 Powermail 2.x 表单的某些复选框字段中,我在复选框的值内有 HTML,这是网站上需要的,但应该在发给接收者的电子邮件中“解析” .

选定的值

<span class="kurs-col1">Nr.1</span> <span class="kurs-col2">Kurs 1 </span> <span class="kurs-col3">1.1.2015</span> 

这是我在电子邮件中需要的输出:

Nr.1 Kurs 1 1.1.2015

我想我是在 Powermail 1.x 中使用以下 TypoScript 完成的:

label.parse = true
label.allowTags = span,strong

但这些设置似乎消失了。我该怎么做?

【问题讨论】:

    标签: typo3 typo3-6.2.x powermail


    【解决方案1】:

    现在我尝试编辑邮件模板ReceiverMail.html

    我可以成功地从一个字段中剥离标签:

    <f:format.stripTags>
    {uid1694}
    </f:format.stripTags>
    

    但这不适用于 {powermail_all}。

    我转到 Partials/PowermailAll/Mail.html 并将 &lt;f:format.stripTags&gt;&lt;/f:format.stripTags&gt; 包裹在字段的值周围:

    <tr>
    <td valign="top">
        <b><vh:string.RawAndRemoveXss>{answer.field.title}</vh:string.RawAndRemoveXss></b>
    </td>
    <td valign="top">
        <f:if condition="{vh:Condition.IsArray(val: '{answer.value}')}">
            <f:else>
                <f:format.nl2br><f:format.stripTags>{answer.value}</f:format.stripTags></f:format.nl2br>
            </f:else>
            <f:then>
                <f:for each="{answer.value}" as="subValue" iteration="index">
                    <f:if condition="{subValue}">
                        <f:format.stripTags>{subValue}</f:format.stripTags><f:if condition="{index.isLast}"><f:else>, </f:else></f:if>
                    </f:if>
                </f:for>
            </f:then>
        </f:if>
    </td>
    

    而且它很有效,并且非常适合流体和 Powermail!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-04-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-29
      • 1970-01-01
      • 2013-10-13
      相关资源
      最近更新 更多