2017 © Pedro Peláez
 

silverstripe-module silverstripe-flash-messages

A simple module for sending flash messages in your SilverStripe app.

image

rentaswag/silverstripe-flash-messages

A simple module for sending flash messages in your SilverStripe app.

  • Monday, January 25, 2016
  • by Cheddam
  • Repository
  • 1 Watchers
  • 3 Stars
  • 70 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 1 Versions
  • 25 % Grown

The README.md

silverstripe-flash-messages

for flashing dem messages, (*1)

Usage

composer require cheddam/silverstripe-flash-messages, (*2)

In controller methods:, (*3)

$this->flashMessage('She drove me here', 'warning');, (*4)

In templates:, (*5)

<% if $FlashMessagesPresent %>
    <% loop $FlashMessages %>
        <div class="message message--$Type">$Message</div>
    <% end_loop %>
<% end_if %>

Caveats

  • Currently $FlashMessages can only be called once as it cleans up the messages before returning them. Currently looking for a better way to handle this.

The Versions

25/01 2016

dev-master

9999999-dev

A simple module for sending flash messages in your SilverStripe app.

  Sources   Download

MIT

The Requires

 

by Garion Herman