POST TIME:2020-04-08 22:19
第一種:
在/include/inc_archives_view.php文件中。
查找tp.typedir,然后替換成tp.typedir,tp.typename。
最后在文章模板中用{dede:field name=’typename’/}調(diào)出來。這樣就OK啦。。
第二種:
就“{dede:field name=’title’/}-{dede:field name=’typename’/}-{dede:global name=’cfg_webname’/}”這樣就可以顯示啦。
第三種:
本來想修改inc_archives_view.php來實(shí)現(xiàn),
后來發(fā)現(xiàn)用“position”更簡便。。。(不知道有沒有人發(fā)過,現(xiàn)在分享一下,有不足之處還請(qǐng)高手多多指點(diǎn)哦:)
代碼如下:
{dede:field name=’title’/}-{dede:field name=’position’ runphp=’yes’}
$tc=”-”; //分隔符
$tw=$GLOBALS['cfg_list_symbol']; //調(diào)用位置分隔符
@me=html2text(@me); //去除html標(biāo)簽
$tf=split($tw,@me); //分解成數(shù)組
for($ta=(count($tf)-2);$ta>=1;$ta–){ //循環(huán)賦值給$tk
$tk.=trim($tf[$ta]).$tc;
}
$tk=substr($tk,0,-1);
@me=$tk; //賦值給@me