ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 解決中 / 官方已回 通用頁面的欄目導航時,如何在以下標簽中添加 頂級欄目id 8 0
迅睿CMS版本:4.5.2 #return

模板標簽里面

通用頁面的欄目導航時,如何在以下標簽中添加 頂級欄目id, 因為高亮是調用的該欄目頂級欄目id數字。

{category module=share pid=0}

<li class="{if IS_SHARE && $catid && dr_in_array($catid, $t.catids)} current{/if}"><a class="first-level" href="{$t.url}" target=""><strong>{$t.name}</strong></a><i></i>

{category module=share pid=$t.id return=t2}

<li><a href="{$t2.url}" target=""><span>{$t2.name}</span></a></li>

{/category}

{/category}

官方提醒:使用category欄目循環標簽的生成工具,填寫參數就可以生成相關的代碼,每個參數后面都有用法解釋

解決方案
  • 這個寫法看著沒有問題呀,很規范

    QQ2351735967-擅長Thinkphp、CI4、XunRuiCMS,可接私單!
  • </li>

    <li class="nli" id="nav_7">

    <span><a href="/list7" target="_self" data-n="4" title="">服務</a></span>

    <ul class="sub" data-m="4">

    <li><a href="" target="_self">服務能力</a></li>

    <li><a href="/list10" target="_self">經典案例</a></li>

    </ul>

    </li>

    <li class="nli" id="nav_3">

    <span><a href="/news6" target="_self" data-n="5" title="">新聞</a></span>

    <ul class="sub" data-m="5">

    <li><a href="/news6" target="_self">企業新聞</a></li>

    <li><a href="/news47" target="_self">行業資訊</a></li>

    </ul>

    </li>

    <li class="nli" id="nav_5">

    <span><a href="/page12" target="_self" data-n="6" title="">關于我們</a></span>

    <ul class="sub" data-m="6">

    <li><a href="/page12" target="_self">企業簡介</a></li>

    <li><a href="/page4" target="_self">聯系我們</a></li>

    </ul>

    </li>

    紅色數字是頂級欄目id,如何調用,通用頁面的欄目導航時,如何添加 頂級欄目, 因為高亮是調用的該欄目頂級欄目id數字。

    建站
  • 回復@幸福佬 注意審題,該欄目的頂級欄目id,而非該欄目id。

    建站
  • 回復@夜雨微瀾 $top.id 是當前欄目頂級欄目id的意思

  • 回復@志偉 $top.id適合于當前頂級欄目,但是要循環中的欄目,各自的頂級欄目id,要獲取不同的頂級欄目數字。

    建站
  • 回復@夜雨微瀾

    {category module=share pid=0 return=c1}
    
     <li class="nli" id="nav_{$c1.id}"> 
      
     <span><a href="/list7" target="_self" data-n="4" title="">{$c1.name}</a></span>  
     <ul class="sub" data-m="4">  
    {category module=share pid=$c1.id return=c2}
     <li><a href="" target="_self">{$c2.name}</a></li>
    {/category}
       </ul>  
     </li>  
     {/category}

    我測試過 這樣沒問題的,可以掉出來



  • 三樓ok的,沒有問題

    {category module=share pid=0}
    {$t.id}就是頂級欄目id
    <li class="{if IS_SHARE && $catid && dr_in_array($catid, $t.catids)} current{/if}"><a class="first-level" href="{$t.url}" target=""><strong>{$t.name}</strong></a><i></i>
    {category module=share pid=$t.id return=t2}
    <li><a href="{$t2.url}" target=""><span>{$t2.name}</span></a></li>
         {/category}
     {/category}