[TYPO3-dev] Flash Messages for Frontend?

Sebastian Gebhard sebastiangebhard at hoch2.de
Tue Mar 2 16:50:00 CET 2010


Hi,

current implementation of flash messages is for BE usage, but IMO it 
would be cool to have a general purpose flash message system also in the 
FE. Im not too deep in Flash Messages, but I thought of it like this:

$GLOBALS['TSFE']->flashMessageQueue holds an instance of 
t3lib_FlashMessageQueue and Extensions can add their messages to the Queue:

$flashMessage = t3lib_div::makeInstance(
   't3lib_FlashMessage',
   'You successfully subscribed our Newsletter'
);
$GLOBALS['TSFE']->flashMessageQueue->addMessage($flashMessage);

Then in tslib_page_frontend.html there could be an additional marker 
###FLASHMESSAGES### which is filled with the rendered messages.

The core should deliver some default CSS and JS for the flash messages 
which can be overwritten by the site admin.

Such a system would make it easier to get a consistent look and feel for 
such messages on a website, in opposite to a website where every 
extension implements its own messaging.

What do you think?

Kind regards,
Sebastian




More information about the TYPO3-dev mailing list