好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

DEDE内容页调用SEO标题、描述、关键字的方法

找了很多帖子都没看到解决的方法,参考了论坛某人发的帖子,联想得出的方法。 内容页调用SEO标题:在<title></title>之间加入以下代码:

内容来自dedecms

{dede:field name='typeid' runphp='yes'} $id=@me; global $dsql; $sql="select seotitle from dede_arctype where id=$id"; $row=$dsql->getOne($sql); @me=$row["seotitle"]; {/dede:field} 内容页调用栏目描述:

copyright dedecms

把默认的

本文来自织梦

<meta name="description" content="{dede:field.description function='html2text(@me)'/}" /> 改成: copyright dedecms

<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"]; {/dede:field}" /> 内容页调用栏目关键字: copyright dedecms

把默认的<meta name="keywords" content="{dede:field.keywords/}" /> 织梦内容管理系统

改成:

本文来自织梦

<meta name="keywords" content="{dede:field name='typeid' runphp='yes'} $id=@me; global $dsql; $sql="select keywords from dede_arctype where id=$id"; $row=$dsql->getOne($sql); @me=$row["keywords"]; {/dede:field}" />

查看更多关于DEDE内容页调用SEO标题、描述、关键字的方法的详细内容...

  阅读:53次