Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heimrichhannot/contao-status_messages
https://github.com/heimrichhannot/contao-status_messages
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/heimrichhannot/contao-status_messages
- Owner: heimrichhannot
- Created: 2015-11-04T09:59:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-10-17T09:45:10.000Z (about 1 year ago)
- Last Synced: 2024-10-21T03:03:27.021Z (2 months ago)
- Language: PHP
- Size: 117 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Status Messages
A general status message module for the frontend.
## Features
- use same functionality as contao message class in the frontend
- [Encore Bundle](https://github.com/heimrichhannot/contao-encore-bundle) support## Usage
### Install
1. Install with composer or contao manager
```composer require heimrichhannot/contao-status_messages```
1. Update database### In a module
Simply add the following to your template:
```php
id); ?>
```To add new Messages use the appropriate function in StatusMessage:
```php
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.