当前位置:Gxlcms > PHP教程 > ecmall模板编辑中的标题如何自定义读取

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

时间:2021-07-01 10:21:17 帮助过:32人阅读

碰见了一个问题,刚上线的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. <span style="color:#ff0000;">{$page_seo}span>
  5. <meta name="viewport" content="width=1200, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" />
  6. <meta name="apple-mobile-web-app-capable" content="yes" />
  7. <meta name="format-detection" content="telephone=no" />
  8. <link rel="shortcut icon" href=" http://www.ya-jing.cn "/>


标签为:$page_seo

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

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

打开如下:


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

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

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

以上就介绍了ecmall模板编辑中的标题如何自定义读取,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

人气教程排行