Summary


Hi everyone,
i am wondering for a long time now why the enquemessage method has no seperate title attribute..http://docs.joomla.org/Display_error_me ... ices#Error

Code:

JFactory::getApplication()->enqueueMessage('Your Message', 'type');


Actually i can use the type for setting the message title, but it is not very comfortable for multilanguage sites, because you have to create a new css class for every message title you create.
 

Code:

JFactory::getApplication()->enqueueMessage('Your Message', 'type');


creates 
 

Code:

<div id="system-message-container">
   <div id="system-message">
      <div class="alert alert-type">
         <a class="close" data-dismiss="alert">×</a>
         <h4 class="alert-heading">type</h4>
         <div>
            <p>Your Message</p>
         </div>
      </div>
   </div>
</div>


So the css class is always a combination between alert- and the "type".
In my opinion a call like this would make much more sense, so that you can still use the bootstrap classes like success, error and so on.

Code:

JFactory::getApplication()->enqueueMessage('Your Message', 'type', 'title');


In my example a 

Code:

JFactory::getApplication()->enqueueMessage('Your Message', 'success');


outputs the word "success" as the title, but there is no way to translate it (for example into german).
What do you think?
Kind regards,
Qlimax
Opened On:
11 Aug 2014, 4:17 by Qlimax 90
Closed On:
22 Aug 2014, 16:41
Status:
Closed

Responses

Posted on 17 Aug 2014, 8:58 by Jan Pavelka

Hi, yes, this feature will be great. In last time I get advices from other uses to pull request on github, maybe this should be the way how to add this feature:

 

( http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=34042 )

and this useful info by Tobias:

http://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

 

Jan
Posted on 22 Aug 2014, 16:41 by Brian Teeman

Thank you for your contribution and participation in the bug tracking process. We have now moved our bug tracking process to http://issues.joomla.org/ so please do not update the issue here. When you create a pull request an issue will be automatically created there.
Posted on 25 Aug 2014, 12:04 by Tobias Zulauf

Hi Qlimax,

>Code:

>JFactory::getApplication()->enqueueMessage('Your Message', 'success');

>outputs the word "success" as the title, but there is no way to translate it (for example into german).

Yea but you can add a language constant for "success" like: SUCCESS="Erfolgreich"

or use the "core" types like

'warning' - yellow

'notice' - blue

'error' - red

'message' (or empty) - green

That have been translated and implemented with the Core :)