PHP头条
热点:

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

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

 

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

www.phpzy.comtrue/php/34316.htmlTechArticleecmall模板编辑中的标题如何自定义读取,ecmall模板 碰见了一个问题,刚上线的ecmall项目。客户说标题不要商城首页这四个字。 我去源码里找,找了半天才找到。 问题描述如下: 找到...

相关文章

PHP之友评论

今天推荐