eyoucms首頁(yè)列表頁(yè)調(diào)用文章content內(nèi)容的方法
2020-05-27
關(guān)于首頁(yè)、列表頁(yè)調(diào)用文章content內(nèi)容的兩種方法,需要注意的是無(wú)論是列表還是首頁(yè),要調(diào)出具體content內(nèi)容,都要先在arclist里加addfields='content',方法如下:
1、不過(guò)濾HTML的方法
{eyou:arclist titlelen='40' row='4' typeid='5' addfields='content' }
<p>{$field.content}</p>
{/eyou:arclist}2、過(guò)濾內(nèi)容的HTML,輸出純文字
{eyou:arclist titlelen='40' row='4' typeid='5' addfields='content' }
<p>{$field.content|html_msubstr=###}</p>
{/eyou:arclist}addfields='content' 為調(diào)取文章內(nèi)容的標(biāo)簽屬性,必加在arclist里
{$field.content} 為調(diào)取文章內(nèi)容不過(guò)濾樣式的標(biāo)簽。
{$field.content|html_msubstr=###} 為調(diào)取文章內(nèi)容過(guò)濾樣式的標(biāo)簽。
{$field.content|html_msubstr=###,0,155} 為調(diào)取文章內(nèi)容過(guò)濾樣式并截取155個(gè)字符的標(biāo)簽。
以上方法同樣換成自定義字鍛也可以。








