这里老蒋将我们采用的办法记录下来。
{if $type=='index'&&$page=='1'}
<title>首页标题</title>
<meta name="keywords" content="首页关键字" />
<meta name="description" content="首页描述" />
{elseif $type=='article'}
<title>{$title}</title>
<meta name="description" content="{php}echo preg_replace('/[\r\n\s]+/', '', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),80)).'...');{/php}" />
{elseif $type=='tag'}
<title>{$title}</title>
<meta name="keywords" content="{$title}" />
<meta name="description" content="{$title}" />
{else}
<title>{$title}</title>
{/if}这里我主要是单独给TAG页面用到:
$type=='tag'定义区分单独的TAG分页模式。