Howdii folks!🙂
This is my first post on this informative board you have here.
Joomla! As I realize my Question is related to a specific CMS, but that CMS is coded mainly in PHP. So a Think this is the right place to post my question.
My idea is to have specific divs and module positions for specific pages. My though on achieving this is...
<?php
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
$option1 = "<div id='main'>
<jdoc:include type='modules' name='4-main' style='xhtml' />
<jdoc:include type='message' />
<jdoc:include type='component' />
</div><!--main-->";
$option2 = "<div id='main2'>
<jdoc:include type='modules' name='9-main2' style='xhtml' />
<jdoc:include type='message' />
<jdoc:include type='component' />
</div><!--main-->
<div id='temp-sidebar'>
<jdoc:include type='modules' name='10-temp-sidebar' style='xhtml' />
</div><!--temp-sidebar-->";
if ( $url == 'http://colourbook.ca/index.php')
{
echo $option1;
}
else
{
echo $option2;
}
?>
the problem is that
<jdoc:include type='modules' name=...
seems to be loaded after joomla does its thing and assigns the module positions.
I have other constraints the prohibit me from making a second template, so the need for a dynamic template is key.
Please help if you can.