迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發框架,基于MIT開源許可協議發布,免費且不限制商業使用,是免費開源的產品,以萬端互聯為設計理念,支持的微信公眾號、小程序、APP客戶端、移動端網站、PC網站等多終端式管理系統。
聯系官方銷售客服
1835022288
028-61286886
想做一個下拉導航如圖
請問怎么樣循環出 二級的每個欄目的內容在 三級彈出來?
目前我這樣設置,不知道是否正確.
{category module=share pid=$t2.id return=t3} {module module=goods catid=$t3.id field=url,title,thumb,catid order=updatetime num=4} {/module} {/category}
官方提醒:使用module內容循環標簽的生成工具,填寫參數就可以生成相關的代碼,每個參數后面都有用法解釋
官方提醒:使用category欄目循環標簽的生成工具,填寫參數就可以生成相關的代碼,每個參數后面都有用法解釋
對是對的,前提是t2是從哪里來的
{category module=share pid=0}
一級
{category module=share pid=$t.id return=t2}
二級
{category module=share pid=$t2.id return=t3}
三級
{module module=goods catid=$t3.id field=url,title,thumb,catid order=updatetime num=4}
{/module}gory}
{/category}
{/cate
回復@迅睿框架技術-張洪
思路沒有問題,最嚴謹的,加一個判斷
{category module=share pid=0} 一級 {if $t.child} {category module=share pid=$t.id return=t2} 二級 {if $t2.child} {category module=share pid=$t2.id return=t3} 三級 {if $t3.mid} {module module=$t3.mid catid=$t3.id field=url,title,thumb,catid order=updatetime num=4} {/module} {/if} {/category} {/if} {/category} {/if} {/category}
對是對的,前提是t2是從哪里來的
{category module=share pid=0}
一級
{category module=share pid=$t.id return=t2}
二級
{category module=share pid=$t2.id return=t3}
三級
{module module=goods catid=$t3.id field=url,title,thumb,catid order=updatetime num=4}
{/module}gory}
{/category}
{/cate
{/category}
回復@迅睿框架技術-張洪
思路沒有問題,最嚴謹的,加一個判斷