Search code examples
joomlajoomla1.5joomla-extensionsjoomla-templatejoomla-component

How to display system message outside of template in Joomla 1.5?


Joomla Geeks!

Please help me. Web designers created design for Joomla, where

<jdoc:include type="message" />

should be located inside of custom component's view (default.php). It's because of divs nesting, I can't change anything.

Nevertheless, I have to find a solution to include Joomla system messages in component's view (default.php) instead of template's index.php, how to do that? Is it possible?

UPD: I've solved the problem, but now I need to override this code:

<dl id="system-message">
  <dt class="message">MESSAGE_TYPE</dt>
  <dd class="message message fade">
    <ul>
      <li>MESSAGE_TEXT</li>
    </ul>
  </dd>
</dl>

with this one:

<div class="message">
  <span class="jsMessage info_message">
    <span>
      MESSAGE_TEXT <a class="close jsCloseMessage" href="javascript:void(0)"></a
    </span>
  </span>
</div>

Should I use templates/mytemplate/html/modules.php file for that?


Solution

  • $document = & JFactory::getDocument();
    $renderer = $document->loadRenderer('message');
    $msg=$renderer->render();