heimrichhannot/contao-status_messages
最新稳定版本:2.5.0
Composer 安装命令:
composer require heimrichhannot/contao-status_messages
包简介
A general status message bundle for the frontend.
README 文档
README
A general status message module for the frontend.
Features
- use same functionality as contao message class in the frontend
- Encore Bundle support
Usage
Install
-
Install with composer or contao manager
composer require heimrichhannot/contao-status_messages -
Update database
In a module
Simply add the following to your template:
<?php echo \HeimrichHannot\StatusMessages\StatusMessage::generate($this->id); ?>
To add new Messages use the appropriate function in StatusMessage:
StatusMessage::addError('An error has happened', $this->id);
By using the global frontend module ModuleStatusMessages
Simply add the module to your page. The contained javascript gets all messages thrown in your modules and adds it to the global markup element. It's necessary to use javascript here since else you get problems with order and redirects.
统计信息
- 总下载量: 9.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2015-11-04