templateDetails.xml文件

	<positions>
		<position>bhead-top</position>
		<position>bhead-mid</position>
		<position>bhead-btm</position>
		<position>breadcrumb</position>
		<position>bbody-top</position>
		<position>bbody-btm</position>
		<position>side-top</position>
		<position>side-mid</position>
		<position>side-btm</position>
		<position>com-top</position>
		<position>com-btm</position>
		<position>aside-top</position>
		<position>aside-mid</position>
		<position>aside-btm</position>
		<position>bfoot-top</position>
		<position>bfoot-mid</position>
		<position>bfoot-btm</position>
	</positions>

index.php预处理

<?php
// 预处理
$url = clone(JURI::getInstance());

$showBheadTop = $this->countModules('bhead-top');
$showBheadBtm = $this->countModules('bhead-btm');

$showBbodyTop = $this->countModules('bbody-top');
$showBbodyBtm = $this->countModules('bbody-btm');

$showComTop   = $this->countModules('com-top');
$showComBtm   = $this->countModules('com-btm');

$showSide     = ($this->countModules('side-top') or $this->countModules('side-mid') or $this->countModules('side-btm'));

$showAside    = ($this->countModules('aside-top') or $this->countModules('aside-mid') or $this->countModules('aside-btm'));
$showAside   &= JRequest::getCmd('layout') != 'form';
$showAside   &= JRequest::getCmd('task') != 'edit';

$showBfootTop = $this->countModules('bfoot-top');
$showBfootBtm = $this->countModules('bfoot-btm');
?>

Last edited Sep 9, 2011 at 1:45 PM by bubujie, version 2

Comments

No comments yet.