聯(lián)系官方銷售客服
1835022288
028-61286886
模板標簽里面
URL地址相對路徑:/index.php?c=category&id=4
模板文件相對路徑:list.html
我在list.html 模板里面調(diào)用 欄目 我的欄目分為 三級
打開第三級欄目 我想調(diào)用出來 第二級欄目 目前只能 直接寫欄目2 才能調(diào)用出來。
上級欄目 只能用pid=2 這樣 其他欄目 就不行了 有沒有什么辦法 自動的那種不限制死ID
上級欄目
{category module=MOD_DIR pid=2 num=50 order=displayorder}
<li class="m-0 list-inline-item mb-2"><a href='{$t.url}' style="color:#18b20c;" class="fw-600 font-xssss text-grey-700 pt-1 pb-1 ps-3 pe-3 d-inline-block rounded-xl bg-white"><b{if IS_SHARE && $catid && dr_in_array($catid, $t.catids)} style="color:#18b20c;"{/if}>{$t.name}</b></a></li>
{/category}
<br>
當前欄目
{category module=MOD_DIR pid=$cat.pid num=50 order=displayorder}
<li class="m-0 list-inline-item mb-2"><a href='{$t.url}' style="color:#18b20c;" class="fw-600 font-xssss text-grey-700 pt-1 pb-1 ps-3 pe-3 d-inline-block rounded-xl bg-white"><b{if IS_SHARE && $catid && dr_in_array($catid, $t.catids)} style="color:#18b20c;"{/if}>{$t.name}</b></a></li>
{/category}
官方提醒:使用category欄目循環(huán)標簽的生成工具,填寫參數(shù)就可以生成相關的代碼,每個參數(shù)后面都有用法解釋
試一試父級欄目的同級標簽。
欄目頁的模板標簽生成工具:http://223987.com/doc/code/lists.html