zblogphp不同页面三大标签不一样

admin2023-01-192178


{if $type=='article'}
<title>{$title}-{$article.Category.Name}-{$name}</title>
<meta name="keywords" content="{foreach $article.Tags as $tag}{$tag.Name},{/foreach}" />
<meta name="description" content="{$article.Title}是{$name}中一篇关于{foreach $article.Tags as $tag}{$tag.Name}{/foreach}的文章,欢迎您阅读和评论,{$name}" />
{elseif $type=='page'}
<title>{$title}-{$name}</title>
<meta name="keywords" content="{$title},{$name}"/>
{php}$description = preg_replace('/[\r\n\s]+/', ' ', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),135)).'...');{/php}
<meta name="description" content="{$description}"/>
<meta name="author" content="{$article.Author.StaticName}">
{elseif $type=='index'}
<title>{$subname}-{$name}{if $page>'1'}-第{$pagebar.PageNow}页{/if}</title>    //首页
<meta name="Keywords" content="{$zbp->Config('xiaonan')->PostGJC}">
<meta name="description" content="{$zbp->Config('xiaonan')->PostMS}">
{elseif $type=='category'}
<title>{$title}-{$name}-第{$pagebar.PageNow}页</title>
<meta name="Keywords" content="{$title},{$name}">
<meta name="description" content="{$category.Intro}">
{else}
<title>{$title}-{$name}</title>
{/if}


网友评论