typecho调用热门标签 全部标签

Typecho常用代码之:输出全部标签并按文章数量排序(下面代码中的limit=20即输出的标签数量):

 <?php $this->widget('Widget_Metas_Tag_Cloud', array('sort' => 'count', 'ignoreZeroCount' => true, 'desc' => true, 'limit' => 20))->to($tags); ?>  
 <?php while($tags->next()): ?>  
 <li><a rel="tag" href="<?php $tags->permalink(); ?>"><?php $tags->name(); ?></a></li>
 <?php endwhile; ?>

输出全部标签列表,按照MID(创建时间)排序:

    <?php $this->widget('Widget_Metas_Tag_Cloud')
   ->to($taglist); ?><?php while($taglist->next()): ?>
   <li><a href="<?php $taglist->permalink(); ?>" title="<?php $taglist->name(); ?>"><?php $taglist->name(); ?></a></li>
   <?php endwhile; ?>

扫描二维码,在手机上阅读!