通过这个例子来设置“首页2栏而内页3栏等效果”,举一反三还是得靠自己。
实现首页3栏而内页2栏,这样就得判断访问的页面是否为首页:
if($_GET['main_page'] == "" || ($_GET['main_page'] == "index" && $_GET['cPath'] == "" ))
当判断完首页就让右栏(或左栏)显示,简单代码如下:
if($_GET['main_page'] == "" || ($_GET['main_page'] == "index" && $_GET['cPath'] == "" )){
$flag_disable_right = true;
}else{
$flag_disable_right = false;
}
将以上代码放入 /includes/templates/YOUR/common/tpl_main_page.php 里的适当位置,具体要怎么修改还是得取决于要实现什么样的功能。