2

ZBlog页面判断实现首页和分类列表页分离

 2 years ago
source link: https://www.huhexian.com/31570.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

ZBlog页面判断实现首页和分类列表页分离

青山 2022-03-1209:17:04评论503字

本文章向大家介绍zblog首页和列表页分离 首页列表文章不显示置顶的方法,主要包括zblog首页和列表页分离 首页列表文章不显示置顶的方法使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

ZBlog页面判断的写法:

  1. {if $type=='index'&&$page=='1'} /*判断首页*/
  2. {if $type=='category'} /*判断分类页*/
  3. {if $type=='article'} /*判断日志页,不含独立页面,{if $article.Type==ZC_POST_TYPE_ARTICLE}(另一方案)*/
  4. {if $type=='page'} /*判断独立页面*/
  5. {if $type=='author'} /*判断用户页*/
  6. {if $type=='date'} /*判断日期页*/
  7. {if $type=='tag'} /*判断标签页*/

ZBlog首页和分类列表页分离的写法:

在index.php文件里作判断,分离模板。比如:

  1. {if $type=='index'&&$page=='1'}
  2. {template:c_index}
  3. {else}
  4. {template:c_list}
  5. {/if}

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK