heimrichhannot / contao-notification_center_plus
扩展通知中心,增加额外功能。
1.7.0
2024-02-16 09:47 UTC
Requires
- php: ~5.4 || ~7.0 || ^8.0
- bariew/phpquery: ~1.0
- contao-community-alliance/composer-plugin: ~2.4 || ~3.0
- contao/core-bundle: ^3.5.1 || ~4.1
- eluceo/ical: ^0.16
- heimrichhannot/contao-haste_plus: ~1.4
- heimrichhannot/contao-status_messages: ^1.0|^2.0
- terminal42/notification_center: ^1.5
- dev-master
- 1.7.0
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.39
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.31
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-09-16 11:06:12 UTC
README
扩展通知中心,增加额外功能。
通用功能
- 可以定义标题和内联CSS(支持自动内联)
- 为当前登录的前端用户和表单添加额外的问候语标记(##salutation_user##, ##salutation_form##)
- 忘记密码模块现在有单独的跳转用于更改密码
- 可以从通知中心标记动态生成ics文件,并将其添加到附件中
标记
将自动生成的ICS文件添加到通知附件中
- 像往常一样创建您的通知。
- 将标记
##ics_attachment_token##
添加到消息的tl_nc_language
记录中的附件标记,并在表单底部激活选项。 - 现在您可以根据需要将标记添加到不同的字段。
上下文标记
通知中心+添加上下文标记,如环境变量和页面信息到标记数组中,因为这些信息在稍后通过cron发送时不可用。
if, then, else
如果您想在消息内部检查条件,可以使用以下示例
Association: {if form_association!=''}##form_association##
{else}unknown
{endif}
提示
{if form_association!=''}
- 必须为L-Value不使用引号
- 必须在L-Value和运算符之间没有空格
- 必须在运算符和R-Value之间没有空格
- L-Value或R-Value代表标记数组中的键 $arrData['form_association'] = 'heimrichhannot'
使用可覆盖的haste_plus属性
您现在可以选择使用在 heimrichhannot/contao-haste_plus 中可用的可覆盖属性,也可以在此模块中使用。只需将类似以下代码添加到 "sendNotificationMessage"-钩子中即可
public static function sendNotificationMessage(Message $objMessage, &$arrTokens, $strLanguage, $objGatewayModel)
{
$arrTokens['overridableProperties'] = ['email_sender_address', 'email_sender_name', 'email_replyTo', 'email_subject'];
$arrTokens['overridableEntities'] = [['tl_calendar_events', $intEventId]];
}
$objEvent
是您在dca中调用 General::addOverridableFields() 以添加来自其他dca的可覆盖字段的实体。请参阅 heimrichhannot/contao-haste_plus 中的 General::addOverridableFields()
和 General::getOverridableProperty()
以获取更多详细信息。