业务经理

微信扫描以上二维码

028-61286886

技术咨询

tab切换循环代码

开源系统 更新 2021-03-24 18:42:33 迅睿粉丝

<div class="haiyan4Box otherBox custom-card hy_bj" id="otherBox">

                <span class="otherBoxTab" id="otherBoxTab">

                    {list action=category module=z id=1,2,3,4,5,6,7,8,9,10,11,12,13 return=l}

                        <div {if $key_l==0}class="hy_active" {else}class="" {/if}>{$l.name}</div>

                  {/list} 

                </span>

                <div class="otherBoxContent">  

                     {list action=category module=z id=1  return=c1}

                    <div class="otherBoxContentItem {if $key_l==0}style="display:block;" {else}style="" {/if}">

                        {php $pidname=$ci->get_cache('module-'.SITE_ID.'-z', 'category', $t[catid], 'pid');}

                        <a href="{$t.url}" title="{$t.title}" target="_blank" class="otherBoxContentLeft">

                            <img class="smallPic" src="{dr_thumb($t.thumb, 184, 126)}" width="184px" height="126px" alt="{$t.title}">

                            <div class="otherBoxContentBar" id="otherBoxContentBar">{$t.title}</div>

                        </a>

                    </div>

                    {/list}         

                </div> 

            </div>


tab循环  按理说需要双list循环,但是我不会写,,我上面的代码意思是:上面的list循环的是二级栏目 下面的list循环的是二级栏目下的文章

方案

  • 迅睿粉丝 #1 · 2018-08-15 22:40:04
    忘记悬赏(设置悬赏)了,20元 解决了我会私发20元红包
  • 迅睿粉丝 #2 · 2018-08-15 23:04:05
    满意答案
    首先 你这个代码就有问题,正确的嵌套是
    {list 栏目}
      {list 文章}
      {/list}
    {/list}
    你这样的嵌套 只能把栏目先循环出来 再循环文章 至于能不能对应就不知道了

  • 迅睿粉丝 #3 · 2018-08-15 23:44:16
    九天网络(JiuDay) 能不能帮我写下来? 20元红包奉上
  • 迅睿粉丝 #4 · 2018-08-16 08:49:43
    不诚意,发个悬赏(设置悬赏)吧大神
  • 迅睿粉丝 #5 · 2021-03-24 18:42:33
    @九天网络(JiuDay):感谢你的回复 我已经满意解决

迅睿系统漏洞

导入微信文章
导入微信文章(2026-09-15)
优化排版缺少文字情况
GEO系统
GEO系统(2026-09-15)
运营客户端,防止误触阴影处关闭对话框
独立站群系统
独立站群系统(2026-09-14)
子站独立部署时修复同步附件失败问题
在线客服
在线客服(2026-09-13)
修复删除会话报错问题 删除会话时联动删除聊天图片
在线考试竞赛系统
在线考试竞赛系统(2026-09-12)
增加投票功能 考试功能拓展 注意:更新后需要执行系统更新,更新数...
网上信箱
网上信箱(2026-09-12)
修复新版本兼容问题
GeoSeo收录宝
GeoSeo收录宝(2026-09-12)
1 优化Update.php文件,解决版本在线升级不完整问题 2 ...
GeoSeo工具箱
GeoSeo工具箱(2026-09-11)
修正历史记录推送
微信系统
微信系统(2026-09-11)
增加数据统计总览界面 账号管理增加服务和公众号的区别 菜单管理支持更...
答题系统
答题系统(2026-09-11)
一站式在线答题系统,支持真题考试、题库练习和错题本,适合培训、考证、...