Question

I have the following code:

<div id="content">
    <?php if(count($app->getMessageQueue())) { ?>
        <jdoc:include type="message" />
    <?php } ?>
    <jdoc:include type="component" />
</div><!--#content-->

Everything works fine expect when there are error or system generated messages. When they are presented output looks like:

<div id="content">
    Some error messages
    <h1>Some page title</h1>
    <p>Some content</p>
</div><!--#content-->

I want to they looks like:

<div id="content">
    <h1>Some page title</h1>
    Some error messages
    <p>Some content</p>
</div><!--#content-->

So error messages should be below h1 tag and before p tag. How to achieve that without hacking core files?

Was it helpful?

Solution

If am not wrong, just swap the two lines (1st as component and 2nd as message).

<div id="content">
    <jdoc:include type="component" />
    <?php if(count($app->getMessageQueue())) { ?>
        <jdoc:include type="message" />
    <?php } ?>
</div><!--#content-->
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top