zoukankan      html  css  js  c++  java
  • zblog调取当前分类下的二级、三级分类及其文章

    {foreach $categorys[$category.ID].SubCategorys as $key=>$category }
    <div class="sort-list">
    <div class="proitemtop clearfix">
    <span>0{$key+1}</span>
    <h3><a href="{$category.Url}">{$category.Name}</a></h3>
    {if $category.Intro == ""}
    {foreach Getlist(1,$category.ID,null,null,null,null,array('has_subcate'=>true)) as $related}
    <p><i class="kico-refresh"></i> {SubStrUTF8(TransferHTML($related.Content,"[nohtml]"),250)}</p>
    {/foreach}
    {else}
    <p><i class="kico-refresh"></i> {$category.Intro}</p>
    {/if}
    <div class="prolianjie"> 
    {foreach $categorys[$category.ID].SubCategorys as $category }
    <a href="{$category.Url}">{$category.Name}</a>
    {/foreach}
    </div>
    </div>
    <ul class="clearfix">
    {foreach Getlist(4,$category.ID,null,null,null,null,array('has_subcate'=>true))  as $related}
    <li><a href="{$related.Url}" class="cp-pic"><img src="{suijiimg_suiji($related)}" alt="{$related.Title}"></a>
    <div class="cp-tit"><a class="title" title="{$related.Title}" href="{$related.Url}">{$related.Title}</a>
    <div class="postmeta">
    <time>{$related.Time('Y-m-d H:i:s')}</time>
    <span><i class="kico-eye"></i> {$related.ViewNums}    ℃</span>
    <p class="zhaiyao">{SubStrUTF8(TransferHTML($related.Content,"[nohtml]"),60)}</p>
    <div class="tags">
    {if $related.Tags}<i class="kico-tag"></i> 标签:{foreach $related.Tags as $atag}<a href="{$atag.Url}" target="_blank">{$atag.Name}</a>{/foreach}{/if} </div> </div> </div> </li> {/foreach} </ul> </div> {/foreach}

    参考链接:https://bbs.zblogcn.com/thread-93508.html

    欢迎访问每天进步网:https://meitianjinbu.cn/
  • 相关阅读:
    快速开发一个自己的微信小程序
    ES6系列汇总
    数组、Set对象的互相转换
    CORS 跨域
    模板引擎之hogan.js
    Flex 布局语法教程
    ES6 Javascript 实用开发技巧
    几种知名开源富文本编辑器对比
    python 字符串的一些操作
    python os模块一些常用操作
  • 原文地址:https://www.cnblogs.com/xinlvtian/p/14341710.html
Copyright © 2011-2022 走看看