How to get my main content to load first w/ this template? - Joomla! Forum - community, help and support


hi~
i have been working on customizing template. in header has calls module positions or something. there more stuff in header last template..

positions...
3,4,5,6,7,8 in sidebars
9,10,11 in footer

so how can main content load first?

here's template:

code: select all

<?php
 
defined('_jexec') or die;
jhtml::_('behavior.framework', true);
$dr  = ($this->countmodules('position-3') or $this->countmodules('position-6') or $this->countmodules('position-8'));
$db  = ($this->countmodules('position-9') or $this->countmodules('position-10') or $this->countmodules('position-11'));
$dl  = ($this->countmodules('position-4') or $this->countmodules('position-7') or $this->countmodules('position-5'));
if (!$dl && !$dr)  {$contentwidth = "3";}
if ($dl || $dr)    {$contentwidth = "2";}
if ($dl && $dr)    {$contentwidth = "1";}

$app          = jfactory::getapplication();
$paramst        = $app->gettemplate(true)->params;
$pslideshow        = $this->params->get('display_slideshow', 0);
$logo             = $this->params->get('display_logo', 1);
$pslideshowcontent    = $this->params->get('slideshow', '');
$logocontent         = $this->params->get('logo');


?><!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >

<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
</head>

<body>
<!-- |begin| phoca-site -->
<div id="phoca-site">
 
  <!-- |begin| phoca-wrap -->
  <div id="phoca-wrap">

    <!-- |begin| phoca-header -->
    <div id="phoca-header">
   
      <h1 id="logo"><?php if ($logo == 1) { ?>
      <a href="<?php echo $this->baseurl ?>"><img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($logocontent); ?>"  alt="<?php echo htmlspecialchars($paramst->get('sitetitle'));?>" /></a>
      <?php }
      if ($logo == 0 ) {
        if (htmlspecialchars($paramst->get('sitetitle') != '')) {
          echo '<a href="'. $this->baseurl .'">'.htmlspecialchars($paramst->get('sitetitle')).'</a>';
        } else {
          echo '<a href="'. $this->baseurl .'">'.htmlspecialchars($app->getcfg('sitename')).'</a>';
        }
      } ?>
      <br /><span class="header-desc">
      <?php echo htmlspecialchars($paramst->get('sitedescription'));?>
      </span></h1>
     
      <?php if ($this->countmodules('position-15')) { ?>
      <div class="banner" >
        <jdoc:include type="modules" name="position-15"  />
      </div>
      <?php } ?>
   
    </div>
    <!-- |end| phoca-header -->
   
    <!-- |begin| phoca-topmenu -->
    <div id="phoca-topmenu">
      <jdoc:include type="modules" name="position-1" style="phocatopmenu" />
    </div>
    <!-- |end| phoca-topmenu -->
   
    <?php if ($this->countmodules('position-0')) { ?>
      <div id="phoca-search" ><jdoc:include type="modules" name="position-0"  /></div>
    <?php }; ?>
   
    <?php if ($this->countmodules('position-2')) { ?>
    <div id="breadcrumbs"><jdoc:include type="modules" name="position-2"  /></div>
    <?php } ?>
   
   
    <div id="phoca-middle">
   
    <?php if ($dl) { ?>
      <!-- |begin| phoca-side1-bg -->
      <div id="phoca-side1-bg">
    <?php } ?>
       
        <?php if ($dr) { ?>
        <!-- |begin| phoca-side2-bg -->
        <div id="phoca-side2-bg">
        <?php }
       
        if ($dl) { ?>
        <!-- |begin| phoca-side1 -->
        <div id="phoca-side1">
          <jdoc:include type="modules" name="position-7" style="phocabasic" headerlevel="3" />
          <jdoc:include type="modules" name="position-4" style="phocabasic" headerlevel="3" />
          <jdoc:include type="modules" name="position-5" style="phocadivision" headerlevel="2" />
        </div>
        <!-- |end| phoca-side1 -->
        <?php } ?>
 
        <!-- |begin| phoca-content -->
        <div id="phoca-content<?php echo $contentwidth; ?>">
          <div class="phoca-in">
         
            <?php if ($this->countmodules('position-12')) { ?>
                        <div id="phoca-top"><jdoc:include type="modules" name="position-12"   /></div>
                        <?php } ?>
           
            <jdoc:include type="message" />
            <jdoc:include type="component" />
          </div>
         
          <?php if ($db) { ?>
            <!-- |begin| phoca-content-bottom -->
            <!-- |end| phoca-content-bottom -->
          <?php } ?>
        </div>
        <!-- |end| phoca-content -->
   
        <?php if ($dr) { ?>
        <!-- |begin| phoca-side2 -->
        <div id="phoca-side2">
          <jdoc:include type="modules" name="position-6" style="phocabasic"  headerlevel="3"/>
          <jdoc:include type="modules" name="position-8" style="phocabasic"  headerlevel="3"  />
          <jdoc:include type="modules" name="position-3" style="phocadivision"  headerlevel="3"  />
        </div>
        <!-- |end| phoca-side2 -->
        <?php } ?>
       
 
        <!-- |begin| phoca-footer -->
        <div id="phoca-clr"></div>
        <!-- |end| phoca-footer -->

      <?php
        if ($dr) { ?></div><!-- |end| phoca-side2-bg --><?php }
        if ($dl) { ?></div><!-- |end| phoca-side1-bg --><?php }
      ?>
 
    </div>
    <!-- |end| phoca-middle -->
 
    <?php if ($db) { ?>
    <!-- |begin| phoca-bottom -->
    <div id="phoca-bottom">
      <div class="phoca-in">
        <div class="box box1"> <jdoc:include type="modules" name="position-9" style="phocadivision" headerlevel="3" /></div>
        <div class="box box2"> <jdoc:include type="modules" name="position-10" style="phocadivision" headerlevel="3" /></div>
        <div class="box box3"> <jdoc:include type="modules" name="position-11" style="phocadivision" headerlevel="3" /></div>
      </div>
    </div>
    <!-- |end| phoca-bottom -->
    <?php } ?>
 
  </div>
  <!-- |end| phoca-wrap -->

  <!-- |begin| phoca-footer -->
  <div id="phoca-footer">
    <div class="phoca-in">
      <?php if ($this->countmodules('position-14')) { ?>
            <div class="phoca-footer-last"><jdoc:include type="modules" name="position-14"   /></div>
            <?php } ?>
    </div>
  </div>
  <!-- |end| phoca-footer -->

<?php if ($this->countmodules('debug')) { ?>
  <!-- |begin| phoca-debug -->
  <div id="phoca-debug">
    <jdoc:include type="modules" name="debug" />
  </div>
  <!-- |end| phoca-debug -->
  <?php } ?>

 
<?php if ($this->countmodules('position-1')) { ?> 
  <!-- load menumatic class -->
  <script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascript/menumatic_0.68.3.js" type="text/javascript" charset="utf-8"></script>
  <!-- create menumatic instance -->
  <script type="text/javascript" >
    window.addevent('domready', function() {     
      var mymenu = new menumatic(
        <?php if ($this->direction == 'rtl') { ?> {direction:{x: 'left',y: 'down' }} <?php } ?>
      );
    });   
  </script>
<?php } ?>
  <div>&nbsp;</div>
 
</div>
<!-- |end| phoca-site -->
</body>
</html>






Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support