Remove the Mainbody from all Pages
July 08 Joomla Templates
- GK User
- Mon Nov 02, 2009 9:15 pm
Hi Please help. Is it possible to disable mainbody from all the pages in addition to the front page?
-
- Fresh Boarder
- GK User
- Mon Nov 02, 2009 9:30 pm
for all pages??
well, you can comment out whole mainbody area inside index.php
well, you can comment out whole mainbody area inside index.php
-
- Senior Boarder
- GK User
- Tue Nov 03, 2009 12:50 am
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:
2) Open index.php and find this code:
replace with:
Them find this line:
replace it with:
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
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
-
- Platinum Boarder
3 posts
• Page 1 of 1