POST TIME:2018-09-18 11:26
織夢DEDEcms內容頁模板中調用欄目的SEO標題、描述、關鍵字的方法
在內容頁模板中調用欄目描述:
把默認的<meta name="description" content="{dede:field.description function=’html2text(@me)’/}" />
改成:
<meta name="description" content="{dede:field name=’typeid’ runphp=’yes’}
$id=@me;
global $dsql;
$sql="select description from dede_arctype where id=$id";
$row=$dsql->getOne($sql);
@me=$row["description"];