{php $aid = $v['id'];}
{m:get sql="SELECT id,tag FROM yzm_tag_content AS a LEFT JOIN yzm_tag AS b ON a.tagid=b.id WHERE aid=$aid" limit="5" return="tag_data"}
{loop $tag_data $val}
<a href="{tag_url($val['id'])}" target="_blank" >{$val[tag]}</a>
{/loop}
这样就可以了放在文章调用的循环标签里面
其实官方模板里面就有的,好好看下列表页模板