欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

ecshop

當(dāng)前位置:主頁 > CMS教程 > ecshop >

ECSHOP模版系統(tǒng)Assign和Include模版標(biāo)簽使用介紹

來源:本站原創(chuàng)|時(shí)間:2020-01-11|欄目:ecshop|點(diǎn)擊: 次

ECSHOP模版系統(tǒng)Assign和Include模版標(biāo)簽介紹,assign 用于在模板被執(zhí)行時(shí)為模板變量賦值,Include 標(biāo)簽用于在當(dāng)前模板中包含其它模板. 當(dāng)前模板中的變量在被包含的模板中可用。 必須指定 file 屬性,該屬性指明模板資源的位置。如果設(shè)置了 assign 屬性,該屬性對(duì)應(yīng)的變量名用于保存待包含模板的輸出,這樣待包含模板的輸出就不會(huì)直接顯示了。

Assign

屬性 類型 是否必須 缺省值 描述
var string Yes N/A 被賦值的變量名
value string Yes N/A 賦給變量的值

描述:

assign 用于在模板被執(zhí)行時(shí)為模板變量賦值.

例子:

{assign var="name" value="Bob"}

輸出:

The value of $name is Bob.

Include

屬性 類型 是否必須 缺省值 描述
file string Yes N/A 待包含的模板文件名
assign string Yes N/A 該屬性指定一個(gè)變量保存待包含模板的輸出
[var …] [var type] Yes N/A 傳遞給待包含模板的本地參數(shù),只在待包含模板中有效

描述:

Include 標(biāo)簽用于在當(dāng)前模板中包含其它模板. 當(dāng)前模板中的變量在被包含的模板中可用。必須指定 file 屬性,該屬性指明模板資源的位置。

如果設(shè)置了 assign 屬性,該屬性對(duì)應(yīng)的變量名用于保存待包含模板的輸出,這樣待包含模板的輸出就不會(huì)直接顯示了。

例子1:

{include file="header.tpl"}
{* body of template goes here *}
{include file="footer.tpl"}

可以在屬性中傳遞參數(shù)給待包含模板. 傳遞給待包含模板的參數(shù)只在待包含模板中可見. 如果傳遞的參數(shù)在待包含模板中有同名變量,那么該變量被傳遞的參數(shù)替代。

例子2:

{include file="header.tpl" title="Main Menu" table_bgcolor="#c0c0c0"}
{* body of template goes here *}
{include file="footer.tpl" logo="http://my.domain.com/logo.gif"}

包含 $template_dir 文件夾之外的模板請(qǐng)使用 模板資源 說明的格式.

例子3:

{* absolute filepath *}
{include file="/usr/local/include/templates/header.tpl"}
{* absolute filepath (same thing) *}
{include file="file:/usr/local/include/templates/header.tpl"}
{* windows absolute filepath (MUST use "file:" prefix) *}
{include file="file:C:/www/pub/templates/header.tpl"}
{* include from template resource named "db" *}
{include file="db:header.tpl"}

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有