| Multiple layouts with one template |
Multiple layouts with one templateI found that it was a bit of a pain to code and keep track of multiple templates so ive been searching for a way to do this in Joomla 1.5. I stumbled upon this solution thru a few different threads. Basically I'm testing for the existence of say Fireboard and delivering a unique layout for that & testing for MyBlog then delivering a different layout for MyBlog and if none of these exist then just churn out the standard content block. You should be able to swap these values out for any component. <?php if (JRequest::getVar('option') == 'com_fireboard' ) {?> <!--code to detect Fireboard is loaded--> <div class="MainCol"> <jdoc:include type="component" /> </div> <div class="RightCol"> <jdoc:include type="modules" name="RightCol" style="none" /> </div> <?php } elseif (JRequest::getVar('option') == 'com_myblog') {?> <!--code to detect Blog is loaded--> <div class="LeftCol"> <jdoc:include type="modules" name="LeftCol" style="none" /> </div> <div class="MainCol"> <jdoc:include type="component" /> </div> <?php } else {?> <jdoc:include type="component" /> <?php } ?>
|

