kitzberger/form-mailtext

TYPO3 Form: 通过插件使用邮件文本

安装次数: 58,653

依赖项: 3

建议者: 0

安全性: 0

星标: 7

关注者: 5

分支: 5

开放问题: 2

类型:typo3-cms-extension

2.1.5 2023-09-26 18:49 UTC

This package is auto-updated.

Last update: 2024-09-26 20:46:42 UTC


README

此扩展通过添加一个名为 '邮件文本'(message)的新字段,增强了EXT:form的邮件结束器,允许编辑器在后台表单插件中定义邮件文本

Form plugin

重写EmailFinisher

为此,EXT:form的邮件结束器类被我们的EmailFinisher重写,以便将message变量传递到模板Finishers/Email/Html.html,在那里它由RenderMessageViewHelper处理并渲染到所有创建的电子邮件中。

TypoScript

以下TS设置通过ext_typoscript_setup.typoscript自动添加

plugin.tx_form {
    settings {
        yamlConfigurations {
            100 = EXT:form_mailtext/Configuration/Form/MailtextFormSetup.yaml
        }
    }
}
module.tx_form {
    settings {
        yamlConfigurations {
            100 = EXT:form_mailtext/Configuration/Form/MailtextFormSetup.yaml
        }
    }
}

邮件文本

在邮件文本中,您可以使用输入字段的标识符输出任何用户输入,例如 {text-1}

此外,还有一个实验性功能,允许您使用if等控制流

Hi {text-1},

you've selected {if:singleselect-1:=:}nothing{endif}{if:singleselect-1:=:1}apple{endif}{if:singleselect-1:=:2}orange{endif}{if:singleselect-1:=:3}banana{endif}.

And your other input is within an array: {if:multiselect-1:in:cat,dog,hamster}it's a pet{endif}

Apparently you like {if:selectsingle-1:=:1}bikes{else}walking{endif}

Good bye.