Hi
Basically, removing mainbody is not a good idea.. trust me.
But...like we done in the last templates, you can use the mainbody as module position. This way, you will have more control options over mainbody.
To do this, follow this steps:
*** BACKUP FIRST ***
1) Open template_details.xml file and add mainbody position, like this:
- Code: Select all
<position>mainbody</position>
2) Open index.php and find this code:
- Code: Select all
<?php
// show mainbody on all subpages but not on frontpage
if (!$frontpage_i) :
?>
<div id="mainbody">
<jdoc:include type="component" />
</div>
<?php endif; ?>
replace with:
- Code: Select all
<?php
// show mainbody on all subpages but not on frontpage
if (!($this->params->get("frontpage", 1) == 0 && $menu->getActive() == $menu->getDefault() && $this->countModules('mainbody + user4 + user5 + user6 + user9 + user10 + user11 + bottom') == 0 && $this->countModules($column_position) == 0)) :
?>
<?php
// show mainbody on all subpages but not on frontpage
if (!$frontpage_i || $this->countModules('mainbody')) :
?>
<div id="mainbody">
<?php if($this->countModules('mainbody')) : ?>
<jdoc:include type="modules" name="mainbody" style="gavickpro" />
<?php else: ?>
<jdoc:include type="component" />
</div>
<?php endif; ?>
<?php endif; ?>
Them find this line:
- Code: Select all
<?php endif; ?>
<!-- Footer -->
replace it with:
- Code: Select all
<?php endif; ?>
<?php endif; ?>
<!-- Footer -->
Now you can publish any module on mainbody position, so that component will be invisible, but (very important) existing anyway for other required links.
Cheers