|
|
我想在我的头版上显示我的一些sideboxes,但是不能出现在其他的页面上。 |
|
问题: |
我想在我的头版上显示我的一些sideboxes,但是不能出现在其他的页面上。
|
回答: |
没问题。让我们来举例说明一下吧!
创建一个sidebox的模块文件的过程文件。 这将要把
includes/modules/sideboxes/featured_products.php
复制到 includes/modules/sideboxes/YOUR_TEMPLATE_NAME/featured_products.php. 打开你的新sidebox模块文件,并查看代码。在Zen
Cart 1.3.x 里面的话一般会是这个样子
<?php
BIG COMMENT BLOCK
// test if box should display
$show_featured= true;
if ($show_featured == true) {
MAIN PROCESSING BLOCK
}
?> 我们需要做的是改变这个行:
$show_featured= true;
为
if ($this_is_home_page) {
$show_featured = true;
} else {
$show_featured = false;
} 如果您的sidebox模块没有这么一个条件,如($show_featured
== true)){ ... } ,那么只需添加一些适合您的sidebox,以避免无意中关闭其他sideboxes。 |
|
当前评论: 0 | |
|
本问题添加时间是 2012年 05月 07日。 |
|
|
|
|