比较特殊的模块有breadcrumbs和search,breadcrumbs由于要区分isHome且要在系统提示之前显示,单独处理也许更合适,但不是唯一解

<body onload="prettyPrint()"<?php echo $isHome ? ' id="home"' : ''; ?> class="fixed">
<div id="bhead">
  <div id="bh1st" class="wrapping">
    <div class="filling">
      <jdoc:include type="modules" name="bhead-top" style="zen" headerLevel="3" />
    </div>
  </div>
  <div id="bh5th" class="wrapping">
    <div class="filling">
<?php
$headingTag = $isHome ? 'h1' : 'div'; 
printf("      ".'<%s id="site-title">',
	$headingTag
);
printf("\n        ".'<a href="%s"><img src="%s" alt="%s" /></a>',
	$this->baseurl,
	$this->baseurl.'/templates/'.$this->template.'/images/logo_bhead.png',
	JText::_('步步街网络服务中心')
);
printf("\n      ".'</%s>'."\n", $headingTag);
?>
      <jdoc:include type="modules" name="bhead-mid" style="div" />
    </div>
  </div>
  <div id="bh9th" class="wrapping">
    <div class="filling">
      <jdoc:include type="modules" name="bhead-btm" style="zen" headerLevel="3" />
    </div>
  </div>
</div>
<!-- ######### ######### ######### bbody ######### ######### ######### -->
<div id="bbody">
  <div id="bb1st" class="wrapping">
    <div class="filling">
      <jdoc:include type="modules" name="bbody-top" style="zen" headerLevel="3" />
    </div>
  </div>
  <div id="bb5th" class="wrapping <?php if($isHome){  echo $showAside ? 'nmn' : 'nm'; }else{ echo $showAside ? 'nmn' : 'nm'; } ?>">
    <div class="filling"><a name="mainmenu"></a>
      <!-- ### ### ### ming ### ### ### --> 
      <div id="main" class="ming"><a name="content"></a>
<?php if(!$isHome) : ?>
        <jdoc:include type="modules" name="breadcrumbs" style="div" />
<?php endif; ?>
<?php if ($this->getBuffer('message')) : ?>
        <div class="error">
          <h2><?php echo JText::_('Message'); ?></h2>
          <jdoc:include type="message" />
        </div>
<?php endif; ?>
        <jdoc:include type="modules" name="com-top" style="zen" headerLevel="3" />
        <jdoc:include type="component" />
        <jdoc:include type="modules" name="com-btm" style="zen" headerLevel="3" />
      </div>
      <!-- ### ### ### /ming ### ### ### -->
      <!-- ### ### ### ning n1 ### ### ### --> 
      <div id="side" class="ning n1"> <a name="side"></a>
        <jdoc:include type="modules" name="side-top" style="zen" headerLevel="3" />
        <jdoc:include type="modules" name="side-mid" style="zen" headerLevel="3" />
        <jdoc:include type="modules" name="side-btm" style="zen" headerLevel="3" />
      </div>
      <!-- ### ### ### /ning n1 ### ### ### -->
      <!-- ### ### ### ning n2 ### ### ### -->
<?php if ($showAside) : ?>
      <div id="aside" class="ning n2"> <a name="aside"></a>
        <jdoc:include type="modules" name="aside-top" style="zen" headerLevel="3" />
        <jdoc:include type="modules" name="aside-mid" style="zen" headerLevel="3" />
        <jdoc:include type="modules" name="aside-btm" style="tabs" headerLevel="3" />
      </div>
<?php endif; ?>
      <!-- ### ### ### /ning n2 ### ### ### -->
    </div>
  </div>
  <div id="bb9th" class="wrapping">
    <div class="filling">
      <jdoc:include type="modules" name="bbody-btm" style="zen" headerLevel="3" />
    </div>
  </div>
</div>
<!-- ######### ######### ######### /bbody ######### ######### ######### -->
<div id="bfoot">
  <div id="bf1st" class="wrapping">
    <div class="filling">
      <jdoc:include type="modules" name="bfoot-top" style="zen" headerLevel="3" />
    </div>
  </div>
  <div id="bf5th" class="wrapping nm">
    <div class="filling">
      <div id="site-colophon" class="ming">
        <a href="<?php echo $this->baseurl; ?>" title="图钉实验室">步步街网络服务中心<?php //echo htmlspecialchars($templateparams->get('sitetitle')); ?></a>
        <br />
        备案号 : 宁ICP备08000324号 / 企业注册号: 123-45-67890<br />
        联系地址: 银川市金凤区灵芝巷324号<br />
        手机: 15809503950					/电话: 0951-5171019 <br />
        <span style="color:#fff;">Copyright &copy; 步步街 2011 All Rights Reserved. Contact
        <a href="javascript:formMail()"><span style="color:#fff;">webmaster</span></a>
        for more information</span><br />
        <div class="quick" style="position:absolute; right:0; top:0;">
          <a href="<?php echo $this->baseurl; ?>"><img src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template;?>/images/btn_home.gif" alt="首页" /></a>
          <a href="javascript:history.back();"><img src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template;?>/images/btn_back.gif" alt="后退" /></a>
          <a href="#"><img src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template;?>/images/btn_top.gif" alt="页眉" /></a>
        </div>
      </div>
      <div id="site-logo" class="ning n1">
        <div class="syndicate">
          <jdoc:include type="modules" name="syndicate" />
        </div>
        <div><?php
printf("\n        ".'<a href="%s"><img src="%s" alt="%s" /></a>',
	$this->baseurl,
	$this->baseurl.'/templates/'.$this->template.'/images/logo_bfoot.png',
	JText::_('步步街网络服务中心')
);
?></div>
      </div>
    </div>
  </div>
  <div id="bf9th" class="wrapping">
    <div class="filling">
      <jdoc:include type="modules" name="bfoot-btm" style="zen" headerLevel="3" />
    </div>
  </div>
</div>
<jdoc:include type="modules" name="debug" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/scripts/custom.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/scripts/prettify.js"></script>
<script type="text/javascript"> 
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-8623588-2']);
	_gaq.push(['_setDomainName', '.bubujie.net']);
	_gaq.push(['_trackPageview']);
	(function() {
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	})();
</script>
</body>

Last edited Jul 28, 2011 at 10:49 AM by bubujie, version 9

Comments

No comments yet.