内容页调用SEO标题:
在<title></title>之间加入以下代码:
{dede:field name=‘typeid‘ runphp=‘yes‘}
[email protected];
global $dsql;
$sql="select seotitle from meiwen_arctype where id=$id";
$row=$dsql->getOne($sql);
@me=$row["seotitle"];
{/dede:field}
内容页调用栏目描述:
把默认的<meta name="description" content="{dede:field.description function=‘html2text(@me)‘/}" />
改成:
<meta name="description" content="{dede:field name=‘typeid‘ runphp=‘yes‘}
[email protected];
global $dsql;
$sql="select description from meiwen_arctype where id=$id";
$row=$dsql->getOne($sql);
@me=$row["description"];
{/dede:field}" />
内容页调用栏目关键字:
把默认的<meta name="keywords" content="{dede:field.keywords/}" />
改成:
<meta name="keywords" content="{dede:field name=‘typeid‘ runphp=‘yes‘}
[email protected];
global $dsql;
$sql="select keywords from meiwen_arctype where id=$id";
$row=$dsql->getOne($sql);
@me=$row["keywords"];
{/dede:field}" />