?
avatar zero-24
zero-24
10 Mar 2014

If you would use a Message/Alert at the frontend you can use (like the docs) this:
JFactory::getApplication()->enqueueMessage('Your Message', 'type');
Where type can be one of

'warning' - yellow
'notice' - blue
'error' - red
'message' (or empty) - green

See: http://docs.joomla.org/Display_error_messages_and_notices

If you use 'message', 'notice' or 'warning' the box is allways yellow only 'error' (red) works good here.

Example here:
https://github.com/Buddhima/joomla-cms/blob/config_modules/components/com_config/controller/modules/save.php#L90

Here the message for this code:
message_module_saved

Thanks.

PS: Joomla Code looks down for me so i will add a JC Tracker if it is up.

avatar zero-24 zero-24 - open - 10 Mar 2014
avatar zero-24
zero-24 - comment - 10 Mar 2014
avatar Bakual
Bakual - comment - 10 Mar 2014

The doc page is true for the backend where Isis does an override for the messages where it maps the types to bootstrap classes. See: https://github.com/joomla/joomla-cms/blob/staging/administrator/templates/isis/html/message.php#L16

In frontend it depends on the template how it will show. We could do the same override for Protostar, but it would not change the colors for other templates.

avatar wilsonge
wilsonge - comment - 11 Mar 2014

We probably should do the same for Protostar but agree it's down to the template's overriden specification (which we should move to JLayouts probably whistles)

avatar Bakual
Bakual - comment - 11 Mar 2014

(which we should move to JLayouts probably whistles)

You mean like this? #2849
Go and test :smile:

avatar nicksavov nicksavov - change - 21 Aug 2014
Title
Alert implementation in the frontend don't works as we can find in the docs
Alert implementation in the frontend don't works as we can find in the docs
Labels Removed: ?
avatar brianteeman brianteeman - change - 21 Sep 2014
Category Templates (site)
avatar brianteeman brianteeman - change - 21 Sep 2014
Status New Pending
avatar nicksavov
nicksavov - comment - 14 Oct 2014

Hey guys,

What's the status on this one?

avatar zero-24
zero-24 - comment - 16 Oct 2014

closing as it is template related. Thanks for the update @nicksavov

avatar zero-24 zero-24 - close - 16 Oct 2014
avatar zero-24 zero-24 - close - 16 Oct 2014
avatar zero-24 zero-24 - change - 16 Oct 2014
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-10-16 12:25:09
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment