<?php if ($this->getBuffer('message')) : ?>

655 views
Skip to first unread message

Webdongle

unread,
Jul 25, 2011, 3:24:44 PM7/25/11
to jooml...@googlegroups.com
<?php if ($this->getBuffer('message')) : ?> is no longer needed in the Template because
libraries\joomla\document\html\renderer\message.php
now contains
// Build the return string
      $buffer .= "\n<div id=\"system-message-container\">";
Question is
Where to document it in the Joomla wiki ?

Nick Savov

unread,
Jul 25, 2011, 6:40:54 PM7/25/11
to jooml...@googlegroups.com
Would this page work?
http://docs.joomla.org/JDocumentHTML/getBuffer

> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! Documentation" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/joomla-docs/-/hIvRzjvP95sJ.
> To post to this group, send email to jooml...@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-docs...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-docs?hl=en.
>
>

Webdongle

unread,
Jul 25, 2011, 9:58:18 PM7/25/11
to jooml...@googlegroups.com
Thanks Nick

That might do it, I was thinking of a page more specific to creating a Template.  But that would be a good place to put it.  Now I just have to work out the wording. So that it is accurate and correct.  I will need to word it to make it clear what's happening now  that prevents the IF of <?php if ($this->getBuffer('message')) : ?>  to not work. http://forum.joomla.org/viewtopic.php?p=2566504#p2566504

The fact that the getBuffer('message') now has a value <div id="system-message-container">(etc.) was pointed out by someone else.  The <?php if(count(JFactory::getApplication()->getMessageQueue())):?> solution was sent to me in a PM. http://forum.joomla.org/viewtopic.php?p=2566436#p2566436

That's why I would be more comfortable putting it on a page specific to Templates rather than a page dedicated to the code itself.  The one deals with usage the other with specifics.

k1ll3r8e

unread,
Feb 17, 2013, 8:32:33 PM2/17/13
to jooml...@googlegroups.com
Hey there, another solution is this:

<?php if(trim(strip_tags($this->getBuffer('message')))!=''): ?>

(its works in 1.5.x and 2.5.x)

hope this helps.

Reply all
Reply to author
Forward
0 new messages