Go Back   歡迎來到 xt:Commerce 漢語支援站 > xt:Commerce 技術文件

樣版變數對照圖表-中央區塊首頁內容

From xt:Commerce 技術文件

  樣版檔案結構   搜尋   語言 : 正體中文

 
 

Contents

[edit] 中央區塊首頁內容

  • 樣版中央區域的首頁顯示統由 main_content.html 管理
  • 檔案位置:/templates/樣版名稱/module/main_content.html
  • main_content.html 內容如下:
{config_load file="$language/lang_$language.conf" section="index"}
{$MODULE_error}
<h1>{$title}</h1>
<p>{$text}</p>
<p>{$MODULE_new_products}</p>
<p>{$MODULE_upcoming_products}</p>

[edit] 載入語言常數定義

{config_load file="$language/lang_$language.conf" section="index"}

系統會依客戶所使用的語言環境賦予 $language 變數值,例:tchinese,則上述的載入語法可以視為:

{config_load file="tchinese/lang_tchinese.conf" section="index"}

[edit] 載入錯誤訊息控制變數

當系統發現有任何錯誤時,{$MODULE_error}變數會顯示相關的錯誤訊息

[edit] 載入歡迎詞

  • {$title}變數為客戶登入系統後的歡迎詞句(語言常數),我們可以依需求調整歡迎內容
  • 語言檔: /lang/語言/語言.php,例:正體中文=tchinese, 即: /lang/tchinese/tchinese.php
  • 常數定義描述如下:
define('TEXT_GREETING_PERSONAL', '感謝您再度光臨 <span class="greetUser">%s!</span> 
本商店推出了以下 <a style="text-decoration:underline;" href="%s">新商品</a>');

[edit] 載入首頁中央區塊

{$text}變數為內容管理首頁中央區塊項目,因此我們可以在(後台->內容管理->首頁中央區塊)利用所見即所得編輯器,自行編輯所要的首頁畫面。

[edit] 載入子樣版

功能 樣版檔 引用變數
新上市商品 new_products_default.html {$MODULE_new_products}
即將上市商品 upcoming_products.html {$MODULE_upcoming_products}

 
   
       
   
www.xt-commerce.cn © 2003 - 2007 xt:Commerce GmbH, all rights reserved
發行事項 | 授权