POST TIME:2021-05-14 14:04
本期講解【Field 標記】。【Field 標記】在封面模板、列表模板、文檔模板的使用頻率很高,實用。主要用來獲得特定欄目或檔案的字段值及常用的環(huán)境變量值,其用法比較靈活??梢灾苯诱故緮?shù)據(jù),如調(diào)用position,得到欄目一 > 欄目二” 這樣形式的鏈接;或者,調(diào)用title得到當前文檔的標題。
一:使用說明
注意:
二、測試實例
新建一個文件(如:testindex.html)放到templets/default下,然后將列表欄目的模板文件指定為新建的文件(testindex.html)然后更新相應(yīng)欄目的HMTL,點擊主頁上的相應(yīng)欄目即可顯示相應(yīng)的調(diào)用信息。
<font color="red">調(diào)用position標記,得到:欄目一 > 欄目二” 這樣形式的鏈接:</font>{dede:field name='position'/}<br/>
<font color="red">插件路徑:</font>{dede:field name='phpurl'/}<br/>
<font color="red">模板路徑:</font>{dede:field name='templeturl'/}<br/>
<font color="red">版權(quán)信息:</font>{dede:field name='powerby'/}<br/>
<font color="red">主頁路徑:</font>{dede:field name='indexurl'/}<br/>
<font color="red">主頁名稱:</font>{dede:field name='indexname'/}<br/>
<font color="red">站點名稱:</font>{dede:field name='webname'/}<br/>
<font color="red">所在欄目:</font>{dede:field name='title'/}<br/>
