Mainbody in HomePage

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sat Jun 16, 2012 7:59 pm
Reply with quote
Report this post
Hi There!

I noticed since AppsProTech template hiding main content setting were stripped off, now you have to use mainbody module position if you want main content not to show up. Why is that? What if my design doesn't need mainbody at all?

Is there a way not to use mainbody at the homepage at all?

Thanks!
User avatar
Junior Boarder

GK User
Sat Jun 16, 2012 10:00 pm
Reply with quote
Report this post
In the layouts/blocks/main.php please change the code:

Code: Select all
<section id="gkContentMainbody">
         <?php if($this->API->modules('inset1')) : ?>
         <aside id="gkInset1">
            <jdoc:include type="modules" name="inset1" style="<?php echo $this->module_styles['inset1']; ?>" />
         </aside>
         <?php endif; ?>         
         
         <section id="gkComponentWrap">   
            <?php if($this->API->modules('mainbody_top')) : ?>
            <section id="gkMainbodyTop">
               <jdoc:include type="modules" name="mainbody_top" style="<?php echo $this->module_styles['mainbody_top']; ?>" />
            </section>
            <?php endif; ?>   
            
            <?php if($this->API->modules('breadcrumb') || $this->parent->getToolsOverride()) : ?>
            <section id="gkBreadcrumb">
               <?php if($this->API->modules('breadcrumb')) : ?>
               <jdoc:include type="modules" name="breadcrumb" style="<?php echo $this->module_styles['breadcrumb']; ?>" />
               <?php endif; ?>
               
               <?php if($this->parent->getToolsOverride()) : ?>
                  <?php $this->loadBlock('tools/tools'); ?>
               <?php endif; ?>
            </section>
            <?php endif; ?>
            
            <section id="gkMainbody">
               <?php if(($this->isFrontpage() && !$this->API->modules('mainbody')) || !$this->isFrontpage()) : ?>
                  <jdoc:include type="component" />
               <?php else : ?>
                  <jdoc:include type="modules" name="mainbody" style="<?php echo $this->module_styles['mainbody']; ?>" />
               <?php endif; ?>
            </section>
            
            <?php if($this->API->modules('mainbody_bottom')) : ?>
            <section id="gkMainbodyBottom">
               <jdoc:include type="modules" name="mainbody_bottom" style="<?php echo $this->module_styles['mainbody_bottom']; ?>" />
            </section>
            <?php endif; ?>
         </section>
            
         <?php if($this->API->modules('inset2')) : ?>
         <aside id="gkInset2">
            <jdoc:include type="modules" name="inset2" style="<?php echo $this->module_styles['inset2']; ?>" />
         </aside>
         <?php endif; ?>   
      </section>


to:

Code: Select all
<?php if(!$this->isFrontpage()) : ?>
<section id="gkContentMainbody">
         <?php if($this->API->modules('inset1')) : ?>
         <aside id="gkInset1">
            <jdoc:include type="modules" name="inset1" style="<?php echo $this->module_styles['inset1']; ?>" />
         </aside>
         <?php endif; ?>         
         
         <section id="gkComponentWrap">   
            <?php if($this->API->modules('mainbody_top')) : ?>
            <section id="gkMainbodyTop">
               <jdoc:include type="modules" name="mainbody_top" style="<?php echo $this->module_styles['mainbody_top']; ?>" />
            </section>
            <?php endif; ?>   
            
            <?php if($this->API->modules('breadcrumb') || $this->parent->getToolsOverride()) : ?>
            <section id="gkBreadcrumb">
               <?php if($this->API->modules('breadcrumb')) : ?>
               <jdoc:include type="modules" name="breadcrumb" style="<?php echo $this->module_styles['breadcrumb']; ?>" />
               <?php endif; ?>
               
               <?php if($this->parent->getToolsOverride()) : ?>
                  <?php $this->loadBlock('tools/tools'); ?>
               <?php endif; ?>
            </section>
            <?php endif; ?>
            
            <section id="gkMainbody">
               <?php if(($this->isFrontpage() && !$this->API->modules('mainbody')) || !$this->isFrontpage()) : ?>
                  <jdoc:include type="component" />
               <?php else : ?>
                  <jdoc:include type="modules" name="mainbody" style="<?php echo $this->module_styles['mainbody']; ?>" />
               <?php endif; ?>
            </section>
            
            <?php if($this->API->modules('mainbody_bottom')) : ?>
            <section id="gkMainbodyBottom">
               <jdoc:include type="modules" name="mainbody_bottom" style="<?php echo $this->module_styles['mainbody_bottom']; ?>" />
            </section>
            <?php endif; ?>
         </section>
            
         <?php if($this->API->modules('inset2')) : ?>
         <aside id="gkInset2">
            <jdoc:include type="modules" name="inset2" style="<?php echo $this->module_styles['inset2']; ?>" />
         </aside>
         <?php endif; ?>   
      </section>
<?php endif; ?>
User avatar
Administrator


cron