POST TIME:2021-05-14 14:04
本期講解【Field 標記】。【Field 標記】在封面模板、列表模板、文檔模板的使用頻率很高,實用。主要用來獲得特定欄目或檔案的字段值及常用的環境變量值,其用法比較靈活。可以直接展示數據,如調用position,得到欄目一 > 欄目二” 這樣形式的鏈接;或者,調用title得到當前文檔的標題。
一:使用說明
注意:
二、測試實例
新建一個文件(如:testindex.html)放到templets/default下,然后將列表欄目的模板文件指定為新建的文件(testindex.html)然后更新相應欄目的HMTL,點擊主頁上的相應欄目即可顯示相應的調用信息。
<font color="red">調用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">版權信息:</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/>