第一步:ecshop根目录创建about_us.php文件

内容如下:

ecshop创建关于我们单页

define('IN_ECS', true);

require(dirname(__FILE__) . '/includes/init.php');

/* 显示模板 */

assign_template();

$position = assign_ur_here();

$smarty->assign('page_title', $position['title']); // 页面标题

$smarty->assign('ur_here', $position['ur_here']); // 当前位置

$smarty->assign('categories', get_categories_tree()); // 分类树

$smarty->assign('helps', get_shop_help()); // 网店帮助

$smarty->display('about_us.dwt');

?>

 

第二步:模板文件夹中创建about_us.dwt文件。内容放你的静态文件。

 

第四步:首页绑定入口文件:about.php,这时你首页可以成功访问到about_us了。但是如果您设置了面包屑导航的话会发现,面包屑无法定位到该路径。这时您就需要在ecshop的源文件中做处理了。

 

打开 ecshop/includes/lib_main.php 文件找到 assign_ur_here() 函数,大概在200多行左右有备注为 /* 其他的在这里补充 */ 接着后面写else。如下:

ecshop创建关于我们单页

 

/* about_us */ elseif ('about_us' == $filename) {

$page_title = $GLOBALS['_LANG']['about_us'] . '_' . $page_title;

$args = array('wsid' => '0');

$ur_here .= '<li class="breadcrumb-item"> <a href="about_us.php">' .

$GLOBALS['_LANG']['about_us'] . '</a></li>';

}

 

如果您使用的是中文版本的话,找到语言的common.php文件

ecshop创建关于我们单页

在语言的最后加入:
$_LANG['about_us'] = '关于我们';

 

这样你的面包屑导航就可以正常处理啦!

其他拓展的话暂时还没用上,,有疑问的朋友可以私信,或者有更好方法的朋友可以留言,第一次做ecshop还有些不太明白的地方多多指点。

相关文章: