分类管理 一级分类下添加二级分类栏目怎么调用各自的栏目ID文章

2020-06-24 18:37发布

image.png

付费偷看设置
发送
1条回答
夜絮扬 - 这个人很懒,什么都没留下
1楼 · 2020-06-26 20:00.采纳回答

写sql查询明白?

文章表中有分类id,你直接查询指定分类下文章调用出来即可,这种代码没人给你加的。

{eval  $articlelist=$this->getlistbysql("select * from ".$this->db->dbprefix."topic where articleclassid in (文章栏目id1,文章栏目id2) order by id desc  limit 0,15");}
                  {loop $articlelist $article}
                     文章标题:{$article['title']}
                 {/loop}


一周热门 更多>