POST TIME:2020-03-28 23:53
織夢(mèng)模板的標(biāo)簽typeid是用來表示欄目ID,在列表模板和檔案模板中一般不需要指定,在封面模板中允許用","分開表示多個(gè)欄目;然而有時(shí)候我們發(fā)現(xiàn)它卻不可以在channel里調(diào)用,這個(gè)時(shí)候我建議你可以嘗試將typeid換成type試試!
{dede:channel type='son' typeid='19' row='1'}<a href="[field:typeurl/]" title="[field:typename function='cn_substr(@me,8)'/]" target="_blank">[field:typename function='cn_substr(@me,8)'/]</a>{/dede:channel}
typeid=19為一個(gè)欄目下的第二個(gè)子欄目,在模版中想調(diào)取這個(gè)欄目的信息,用channel 雖然有解決辦法,但是很繁瑣,其實(shí)用{dede:type標(biāo)簽就很好實(shí)現(xiàn)了 :
如下
{dede:type typeid='19' }<a href="[field:typeurl/]" title="[field:typename function='cn_substr(@me,8)'/]" target="_blank">[field:typename function='cn_substr(@me,8)'/]</a>{/dede:type }