Plone 的附加字符串插值:在 contentrule 电子邮件中添加内容文本
项目描述
这是plone.stringinterp模块的 Plone 扩展。
将此添加到您的构建中,您将能够在 内容规则电子邮件中添加完整的内容文本。
如何使用
当您为 Plone 内容规则准备电子邮件操作时,您现在可以在文本中使用两个附加标记:
- ${文本}
当前文档全文
- ${indented_text}
与上面相同,但在每行之前使用制表符对文本进行右缩进。
文本从 HTML 转换为纯文本(通常是 Plone 电子邮件)。
像这样配置的邮件规则:
Hi, the new document "${title}" has been created. ${text}
…将生成:
Hi, the new document "Welcome to Plone" has been created. If you're seeing this instead of the web site you were expecting...
以及这样配置的邮件规则:
Hi, the new document "${title}" has been created. ${indented_text}
…将生成:
Hi, the new document "Welcome to Plone" has been created. If you're seeing this instead of the web site you were expecting...
获取文本
“主文本字段”是一个抽象实体。该产品尝试使用适配器来猜测文本,因此您可以覆盖或提供更具体的适配器(参见代码中的一些示例)。
通常,支持这些类型的文本提取:
基于 ATContentTypes 的带有文本字段的内容类型(事件、新闻项目、文档、主题)
来自 plone.app.discussion 的评论
带有文本字段的敏捷内容类型
另外,如果提供了“文本”属性,它只是尝试读取的通用适配器。
学分
在Regione Emilia Romagna的支持下开发;Regione Emilia Romagna 支持PloneGov 倡议。
变更日志
1.0.0 (2022-07-14)
升级到 plone 5.2 和 python3.8。[重试]
0.3 (2017-11-07)
当对象灵巧性内容具有完全空的文本字段时修复适配器。[卢卡贝尔]
0.2 (2013-09-06)
当对象没有文本字段(即文件)时修复适配器 [cekk]
0.1.1 (2013-08-02)
locales 文件夹未注册 [keul]
0.1 (2013-05-30)
初始发行