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選項下,注冊一下新加菜單。

完成后示例如下圖


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM