首頁  >  文章  >  後端開發  >  ecmall模板編輯中的標題如何自訂讀取

ecmall模板編輯中的標題如何自訂讀取

WBOY
WBOY原創
2016-08-08 09:27:29841瀏覽

碰見了一個問題,剛上線的ecmall專案。客戶說標題不要商城首頁這四個字。

我去源碼裡找,找了半天才找到。

問題描述如下:

找到title最原始的模板themesmalltmalltop.html,打開後:


  1. head>  
  2. base href="{$site_url}/" />  
  3. meta http-equiv="Content-Type" content="text/html; charset={$charset}" />     span style="color:#ff0000;"
  4. >{$page_seo}
  5. span
  6. >  span>   meta name="viewport" content="width=1200, initial-scale=1.0, minimum-scale=0.5, initial-scale=1.0, minimum-scale=0.5, initial-scale=1.0, minimum-scale=0.5, initial-scale=1.0, minimum-scale=0.5, initial-scale=1.0, minimum-scale=0.5, initial-scale=2.  
  7. meta name="apple-mobile-web-app-capable" content="yes" />     meta name=
  8. "format-detection" 
  9. content="telephone=no" />      link rel="shortcut icon" href=" http://www.ya-jing.cn "
  10. />  
  11. 標籤為:$page_seo 這個title description keywords 寫到一起了。如果單改title,需要找到ecmall中的$page_seo的定義處。 找了一大圈,終於找到。這裡:appdefault.app.php 打開如下:


  

class DefaultApp 

extends MallbaseApp  


{  

    
    function index()  
  1.     {  
  2.         $this->assign('index', 1); // 標識目前頁面為首頁,用於設定導航狀態  
  3.         $this->assign('icp_number', Conf::get(
  4. 'icp_number'));  
  5.            $this->_config_seo(array(  
  6.         "color:#ff6666;">    'title' => Lang::get('mall_index').   
  7.                        ));  
  8.         $this->assign('page_description', Conf::get('site_description'));  'site_description'));  
  9.         
  10. $this->assign(
  11. 'page_keywords', Conf::get(
  12. 'site_keywords'));  
  13. 'site_keywords'));           
  14. $this->display(
  15. 'index.html');       }   }  
  16.    ?>  
  17. 其中紅色標記中的程式碼,去掉lang::get(‘mall_index’).就可以了。
  18. 專案地址:www.meichigou.com,今天新上線。歡迎大家指導。另外,還有兩個專案也在進行中,其中一個www.ya-jing.cn配資公司進行的很順利。
  19. 以上就介紹了ecmall模板編輯中的標題如何自訂讀取,包括了方面的內容,希望對PHP教程有興趣的朋友有所幫助。
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn