{* Template Name:默认内容页 * Template Type:single|article|page *}
{php}
//封面图片
$titlepic = $article->Metas->titlepic ? $article->Metas->titlepic : $article->AllImages[0];
{/php}
<!DOCTYPE html>
<html>
<head>
{template:seo}
<link rel="stylesheet" href="{$host}zb_users/theme/{$theme}/style/{$style}.css?v={$themeinfo['modified']}">
</head>
<body>
<!--头部-->
{template:header}
<!--内容-->
<div class="container single">
<!--面包屑导航-->
<div class="crumbs">当前位置:{template:crumbs}</div>
<!--内容详情-->
<div class="detail">
文章标题:{$article.Title}
文章链接:{$article.Url}
文章摘要:{$article.Intro}
截取文章摘要60个字符并去除html代码:
{SubstrUTF8(TransferHTML(trim($article.Intro),'[nohtml][noenter]'),60)}
{SubStrUTF8(TransferHTML($article.Intro,"[nohtml]"),60)}
文章正文:{$article.Content}
文章图片:{$titlepic}
文章浏览数:{$article.ViewNums}
文章发布时间:{$article.Time("PostTime","Y-m-d H:i:s")}
分类名称:{$article.Category.Name}
分类链接:{$article.Category.Url}
文章标签数组:{$article.Tags}
上一篇标题:{$article.Prev.Title}
上一篇URL:{$article.Prev.Url}
下一篇标题:{$article.Next.Title}
下一篇URL:{$article.Next.Url}
</div>
<!-- 调用TAGS -->
<div class="tags">
{foreach $article.Tags as $tag}
<a href="{$tag.Url}">{$tag.Name}</a>
{/foreach}
</div>
<!-- 调用TAGS,加逗号分隔 -->
{if count($article.Tags)>0}
<div class="tags">
标签:
{foreach $article.Tags as $i => $tag}
<a href="{$tag.Url}" title="{$tag.Name}">{$tag.Name}</a>
{if count($article.Tags) > $i},{/if}
{/foreach}
</div>
{/if}
<!-- 评论 -->
{foreach $comments as $key => $comment}
{$comment.XXX}
{/foreach}
<!-- 循环调用该评论的子评论 -->
{foreach $comment.Comments as $key => $comment}
{template:comment}
{/foreach}
<!-- 调用指定用户信息 -->
{$zbp.members[1].Name},显示ID为1的用户名称
</div>
<!--底部-->
{template:footer}
</body>
</html>