请问pbootcms模板内页调用子栏目,如果没有子栏目则调用同级栏目

wdzsjl 4周前 (10-27) 阅读数 12 #织梦DedeCms
{pboot:if('{pboot:nav parent={sort:scode}}[nav:name]{/pboot:nav}' != '')}     {pboot:nav parent={sort:scode}}         <div class="pro_div">             <a class="item fl {pboot:2if('[nav:scode]' == '{sort:scode}')}on{/pboot:2if}" href="[nav:link]">[nav:name]</a>         </div>     {/pboot:nav} {else}     {pboot:nav parent={sort:pcode}}         <div class="pro_div">             <a class="item fl {pboot:2if('[nav:scode]' == '{sort:scode}')}on{/pboot:2if}" href="[nav:link]">[nav:name]</a>         </div>     {/pboot:nav} {/pboot:if}

 

wx.jpg ywfw.jpg
热门