当前位置:首页 >> 备忘笔记 >> Z博客 >> zblogPHP模板 - 常用if判断
zblogPHP模板 - 常用if判断

zblogPHP模板 - 常用if判断

更新时间:24年12月21日 所属分类:Z博客 软件评分: 附件大小: 运行平台: 软件类型: 编辑发布:superadmin 访问次数:51 下载密码:



zblogPHP模板 - 常用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}

 


协助本站SEO优化一下,谢谢!
关键词不能为空
同类推荐