zblog模板常用的if页面判断
是否登陆判断:
{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}声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
仍然有问题? 我们要如何帮助您?



