普通标签云

<?php $this->widget('Widget_Metas_Tag_Cloud')->to($tags); ?>
<?php if($tags->have()): ?>
<?php while ($tags->next()): ?>
<a href="<?php $tags->permalink(); ?>"><?php $tags->name(); ?></a>
<?php endwhile; ?>
<?php endif; ?>

带颜色和大小的标签云

<?php $this->widget('Widget_Metas_Tag_Cloud')->to($tags); ?>
<?php if($tags->have()): ?>
<?php while ($tags->next()): ?>
*大小*
<a style="font-size:<?php printf("%u%%", log($tags->count)*50+100); ?>;" href="<?php $tags->permalink(); ?>"><?php $tags->name(); ?></a>
*颜色*
<a style="color: rgb(<?php echo(rand(0, 255)); ?>, <?php echo(rand(0,255)); ?>, <?php echo(rand(0, 255)); ?>)" href="<?php $tags->permalink(); ?>"><?php $tags->name(); ?></a>
<?php endwhile; ?>
<?php endif; ?>

一个标签+该标签一篇文章

<?php $this->widget('Widget_Metas_Tag_Cloud', array('sort' => 'count', 'ignoreZeroCount' => true, 'desc' => true, 'limit' => 60))->to($tags); ?>
<?php while($tags->next()): ?>
<a href="<?php $tags->permalink(); ?>"><?php $tags->name(); ?></a>
<?php $this->widget('Widget_Archive@tag-' . $tags->mid, 'pageSize=1&type=tag', 'mid=' . $tags->mid)->to($posts); ?>
<?php while ($posts->next()): ?>
<a href="<?php $posts->permalink(); ?>"><?php $posts->title(); ?></a>
<?php endwhile; ?>
<?php endwhile; ?>