Home  >  Article  >  Backend Development  >  ecmall模板编辑中的标题如何自定义读取,ecmall模板_PHP教程

ecmall模板编辑中的标题如何自定义读取,ecmall模板_PHP教程

WBOY
WBOYOriginal
2016-07-13 10:00:25920browse

ecmall模板编辑中的标题如何自定义读取,ecmall模板

碰见了一个问题,刚上线的ecmall项目。客户说标题不要商城首页这四个字。

我去源码里找,找了半天才找到。

问题描述如下:

找到title的最原始模板themes\mall\tmall\top.html,打开后:

 


 
  1. head>  
  2. base href="{$site_url}/" />  
  3. meta http-equiv="Content-Type" content="text/html; charset={$charset}" />  
  4.   
  5. span style="color:#ff0000;">{$page_seo}span>  
  6. meta name="viewport" content="width=1200, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" />       
  7. meta name="apple-mobile-web-app-capable" content="yes" />      
  8. meta name="format-detection" content="telephone=no" />     
  9. link rel="shortcut icon" href=" http://www.ya-jing.cn "/>  


标签为:$page_seo

 

这个title description keywords 写到一起了。如果单改title,需要找到ecmall中的$page_seo的定义处。

找了一大圈,终于找到。在这里:\app\default.app.php

打开如下:

 


 
  1.   
  2. class DefaultApp extends MallbaseApp  
  3. {  
  4.     function index()  
  5.     {  
  6.         $this->assign('index', 1); // 标识当前页面是首页,用于设置导航状态  
  7.         $this->assign('icp_number', Conf::get('icp_number'));  
  8.   
  9.         $this->_config_seo(array(  
  10.         "color:#ff6666;">    'title' => Lang::get('mall_index') . ' - ' . Conf::get('site_title'),  
  11.               
  12.         ));  
  13.         $this->assign('page_description', Conf::get('site_description'));  
  14.         $this->assign('page_keywords', Conf::get('site_keywords'));  
  15.         $this->display('index.html');  
  16.     }  
  17. }  
  18.   
  19. ?>  

其中红色标记中的代码,去掉lang::get(‘mall_index’).就可以了。

 

项目地址:www.meichigou.com,今天新上线。欢迎大家指导。另外,还有两个项目也在进行中,其中一个www.ya-jing.cn配资公司进行的很顺利。

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/973825.htmlTechArticleecmall模板编辑中的标题如何自定义读取,ecmall模板 碰见了一个问题,刚上线的ecmall项目。客户说标题不要商城首页这四个字。 我去源码里...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn