zblog模板常用的if页面判断
分类:zblog教程
41
是否登陆判断:
{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}最新发布
-
zblog响应式自媒体博客主题63号
2026-04-08 -
zblog响应式资讯门户主题62号
2026-04-05 -
zblog响应式文章自媒体资讯主题61号
2026-04-01 -
zblog响应式自媒体资讯主题60号
2026-03-30 -
zblog响应式门户文章资讯主题59号
2026-03-29
热门文章
-
ZBLOG精品手赚APP应用下载主题19号
1225 -
zblog响应式机器设备企业主题10号
1220 -
zblog响应式生活分类信息主题2号
939 -
zblog响应式机械企业外贸主题6号
320 -
简洁大气zblog响应式文章主题52号
306