是否登陆判断:

{if $user.ID>0}{$user.StaticName}{/if}

CMS判断:

{template:header}{if $type=='index'&&$page=='1'}
    {template:post-cms}{else}
    {template:post-category}{/if}{template:footer}

侧栏模块判断:

{if $type=='index'}

     {template:sidebar}

    {elseif $type=='category'} 

     {template:sidebar2}

    {elseif $type=='article'}

     {template:sidebar3}

    {elseif $type=='page'}

     {template:sidebar4}

    {else}

     {template:sidebar5}

    {/if}

single.php文章、页面判断:

{template:header}

    {if $article.Type==ZC_POST_TYPE_ARTICLE}

    {template:post-single}

    {else}

    {template:post-page}

    {/if}

{template:footer}

评论是否开启判断:

{if !$article.IsLock}{template:comments} {/if}
{if $article.CommNums>0}是否有评论{/if}