ecmall模板編輯中的標題如何自訂讀取,ecmall模板
碰見了一個問題,剛上線的ecmall項目。客戶說標題不要商城首頁這四個字。
我去源碼裡找,找了半天才找到。
問題描述如下:
找到title的最原始模板themes\mall\tmall\top.html,開啟後:
<head><base href="{$site_url}/" /><meta http-equiv="Content-Type" content="text/html; charset={$charset}" /><span style="color:#ff0000;">{$page_seo}</span><meta name="viewport" content="width=1200, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="format-detection" content="telephone=no" /> <link rel="shortcut icon" href=" http://www.ya-jing.cn "/>
標籤為:$page_seo
這個title description keywords 寫到一起了。如果單改title,需要找到ecmall中的$page_seo的定義處。
找了一大圈,終於找到。在這裡:\app\default.app.php
開啟如下:
<?phpclass DefaultApp extends MallbaseApp{ function index() { $this->assign('index', 1); // 標識當前頁面是首頁,用於設定導航狀態 $this->assign('icp_number', Conf::get('icp_number')); $this->_config_seo(array( <strong><span style="color:#ff6666;"> 'title' => Lang::get('mall_index') . ' - ' . Conf::get('site_title'),</span></strong> )); $this->assign('page_description', Conf::get('site_description')); $this->assign('page_keywords', Conf::get('site_keywords')); $this->display('index.html'); }}?>其中紅色標記中的代碼,去掉lang::get(‘mall_index’).就可以了。
項目地址:www.meichigou.com,今天新上線。歡迎大家指導。另外,還有兩個項目也在進行中,其中一個www.ya-jing.cn配資公司進行的很順利。