ecshop创建关于我们单页

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

内容如下:

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。如下:

 

/* 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文件

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

 

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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

MySQLandPHP

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值