opencart 后台导航菜单添加步骤

1,找到在catalog\language\english\common\header.php

// Text
$_['text_affiliate'] = 'Affiliates';
$_['text_attribute'] = 'Attributes';
$_['text_attribute_group'] = 'Attribute Groups';
$_['text_backup'] = 'Backup / Restore';
$_['text_banner'] = 'Banners';
$_['text_catalog'] = 'Catalog';
$_['text_category'] = 'Categories';

$_['text_wpcms'] = 'Wpcms';  //新添加的菜单名称

2,找到controller\common\header.php

$this->data['text_catalog'] = $this->language->get('text_catalog');
$this->data['text_category'] = $this->language->get('text_category');
$this->data['text_wpcms'] = $this->language->get('text_wpcms'); //  在这个地方赋值之后会显示

 

$this->data['category'] = $this->url->link('catalog/category', 'token=' . $this->session->data['token'], 'SSL');
$this->data['wpcms'] = $this->url->link('catalog/wpcms', 'token=' . $this->session->data['token'], 'SSL');//这里修改实现href链接值得

3,把要添加的菜单写入模板文件view\template\common\header.tpl中即可

 <li><a href="<?php echo $wpcms; ?>"><?php echo $text_wpcms; ?></a></li>

 4,在菜单system-users-users group下面的Top Administrator选项下,注册一下新加菜单。

完成后示例如下图

转载于:https://www.cnblogs.com/fslnet/p/4114451.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值