热搜词
发表于 2013-2-3 16:51:47 | 显示全部楼层 |阅读模式
[v9] 关于一级栏目与二级栏目的混合调用
94EC54E035ADD38CC8357D9BA25F0C8F_500_500.jpg

搞定了,代码如下
  1. {pc:get sql="SELECT * FROM v9_category WHERE parentid=0 order by listorder ASC" order="listorder ASC" return="data1"}
  2. {loop $data1 $r1}
  3. <li><a href="{$r1[url]}">{$r1[catname]}</a>
  4. <ul>
  5. {pc:get sql="SELECT * FROM v9_category WHERE catid IN ($r1[arrchildid]) AND catid !=$r1[catid]" return="data2"}
  6. {loop $data2 $r2}
  7. <li><a href="{$r2[url]}" >{$r2[catname]}</a></li>
  8. {/loop}
  9. {/pc}
  10. </ul>
  11. </li>
  12. {/loop}
  13. {/pc}
复制代码
全部评论0
回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2024-11-24 22:34 , Processed in 0.192003 second(s), 29 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2024 Discuz! Team