热门文章带有序号的循环标签

风中赏雪 Zblog Zblog 2025-09-27 143 0

带有序号的的热门文章循环标签,$key =>


{php}
$order = array('log_ViewNums'=>'DESC');
$where = array(array('=','log_Status','0'));
$array = $zbp->GetArticleList(array('*'),$where,$order,array(9),'');
{/php}
{foreach $array as  $key => $hotlist}
                               <article class="guide-inner top-num{$key+1}">
                        <div class="guide-inner-info">
                            <h4 class="g-i-top">
                                <span class="g-i-cate"><a href="{$hotlist.Category.Url}" target="_blank">{$hotlist.Category.Name}</a></span>
                                <span class="g-i-time"><i class="icon font-time"></i>{$hotlist.Time('Y-m-d')}</span>
                            </h4>
                            <h5>
                                <a href="{$hotlist.Url}" target="_self">{$hotlist.Title}</a>
                            </h5>
                           <p> {$hotlist.Intro}</p>
                        </div>
                    </article>
{/foreach}