{:implode('、',fun('Count@label','table_name=comment_content&where=aid=$aid'))}后面用了aid不对,X1刚上手正在熟悉,希望各路大神多多指点,谢谢!
{:query('comment_content',['where'=>['aid'=>$rs['id']],'count'=>'id'])}
以cms pc版栏目列表为例:
template\index_style\default\cms\pc_model\main\model_list_title.htm
请忽略样式 仅为演示:
{qb:listpage name="news_list_page_listdata0" rows="15" order="list"} <ul class="qb_ui_ListArticleTimeTitleCnt"> <ol> <dl><dt>{:date("d",$rs.create_time)}</dt><dd>{:date("Y-m",$rs.create_time)}</dd></dl> </ol> <li> <h3><a href="{$rs.url}">{$rs.title|get_word=100} 评论:{:query('comment_content',['where'=>['aid'=>$rs['id']],'count'=>'id'])}</a></h3> <p>{$rs.content|get_word=200}</p> </li> </ul> {/qb:listpage} {$pages}