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/