代码如下:
<portal:articles limit="5" order="post.published_time DESC" categoryIds="$category_ids">
<li class="tm-recent-post-list-li">
<a href="{:url('portal/Article/index',array('id'=>$vo.id,'cid'=>$vo.category_id))}"><img
width="150" height="150" src="{:cmf_get_image_url($vo.more.thumbnail)}"
class="attachment-thumbnail size-thumbnail wp-post-image" alt=""></a><a
href="{:url('portal/Article/index',array('id'=>$vo.id,'cid'=>$vo.category_id))}">{$vo.post_title}</a><span
class="post-date"><i class="fa fa-calendar"></i>{:date('Y-m-d',$vo.published_time)}</span>
</li>
</portal:articles>
报错:
经过反复查看文档发现需要引入标签库。方法:
<taglib name="app\portal\taglib\Portal"/>
在模板文件头部加载上面的标签库。把标签库放在公共头部文件头部,这样就不用每个模板文件写一次标签加载代码了
标签:category,articles,Undefined,标签,ThinkCMF,vo,报错,id From: https://www.cnblogs.com/shen55/p/18278953