<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 全局欄目屬性 > 所謂全局也就是整個前臺模板體系里都能夠使用的標簽 > 相關視頻教程:[ 極致CMS欄目相關講解](https://www.bilibili.com/video/av77259782/) ~~~ {$classtypedata[$id][$str]} $id:欄目的ID $str:欄目對應的字段參數 如:針對于欄目ID等于1的欄目,我們可以這樣輸出以下內容: 欄目名:{$classtypedata[1]['classname']} 模塊標識:{$classtypedata[1]['molds']} 縮略圖:{$classtypedata[1]['litpic']} 當前欄目URL:{$classtypedata[1]['url']} 描述:{$classtypedata[1]['description']} 關鍵詞:{$classtypedata[1]['keywords']} 內容:{$classtypedata[1]['body']} 列表輸出條數:{$classtypedata[1]['lists_num']} 欄目評論數:{$classtypedata[1]['comment_num']} 上級欄目ID:{$classtypedata[1]['pid']} 上級欄目名:{$classtypedata[$classtypedata[1]['pid']]['classname']} 上級欄目URL:{$classtypedata[$classtypedata[1]['pid']]['url']} ~~~ ## 導航高亮及輸出 方式一 > 推薦使用,執行速度快,性能高 ``` #判斷是否首頁,輸出高亮代碼 <li><a class="a1 {if(!isset($type))}color{/if}" href="/">首頁</a></li> {foreach $classtypedata as $v} #判斷輸出可顯示的欄目 {if($v['isshow']==1)} #輸出一級欄目 {if($v['pid']==0)} <li> #判斷是否當前欄目,輸出高亮代碼 <a class="a1 {if(isset($type) && in_array($type['id'],$v['children']['ids']))}color{/if}" href="{$v['url']}">{$v['classname']}</a> #判斷是否有下級,輸出下級分類 {if($v['haschild'])} <ul> {foreach $v['children']['list'] as $vv} <li><a href="{$vv['url']}">{$vv['classname']}</a></li> {/foreach} </ul> {/if} </li> {/if} {/if} {/foreach} ``` 方法二 > 不推薦使用,但也能實現.【loop遍歷】 ``` {loop table="classtype" orderby="orders desc" isshow="1" pid="0" as="v"} 欄目名:{$v['classname']} 欄目URL:{$v['url']} 欄目簡介:{$v['description']} 欄目縮略圖[banner]:{$v['litpic']} #判斷是否有下級: {if(haschild($classtypedata,$v['id']))} #有下級則輸出,輸出下級欄目 {foreach $classtypedata[$v['id']]['children']['list'] as $vv} 欄目名:{$vv['classname']} 欄目URL:{$vv['url']} 欄目簡介:{$vv['description']} 欄目縮略圖[banner]:{$vv['litpic']} {/foreach} {else} #沒有下級則輸出 {/if} {/loop} ``` ## 輸出當前欄目的直系下級欄目列表 方法一 > 推薦使用.如輸出欄目ID為1的下級欄目 ``` {foreach $classtypedata[1]['children']['list'] as $v} 欄目名:{$v['classname']} 欄目URL:{$v['url']} 欄目簡介:{$v['description']} 欄目縮略圖[banner]:{$v['litpic']} {/foreach} ``` 方法二 > 不推薦使用,但也能實現.【loop遍歷】 ``` {loop table="classtype" pid="2" isshow="1" as="v"} 欄目名:{$v['classname']} 欄目URL:{$v['url']} 欄目簡介:{$v['description']} 欄目縮略圖[banner]:{$v['litpic']} {/loop} ``` ## 輸出當前欄目下的直系上級同級分類 ~~~ {foreach $classtypedata as $v} {if($classtypedata[$type['pid']]['pid']==$v['pid'])} #父類相同,那么他們就是同級了,需要注意的是當前欄目為頂級欄目(pid=0)的時候是輸出所有頂級欄目的 欄目名:{$v['classname']} 欄目鏈接:{$v['url']} {/if} {/foreach} ~~~ ## 欄目詳情頁 ~~~ ID:{$type['id']} 當前位置:{$positions} 欄目名:{$type['classname']} 模塊標識:{$type['molds']} 縮略圖:{$type['litpic']} 當前欄目URL:{$type['url']} 或 {$classtypedata[type['id']]['url']} 描述:{$type['description']} 關鍵詞:{$type['keywords']} 內容:{$type['body']} 列表輸出條數:{$type['lists_num']} 欄目評論數:{$type['comment_num']} 上級欄目ID:{$type['pid']} 上級欄目名:{$classtypedata[$type['pid']]['classname']} 上級欄目URL:{$classtypedata[$type['pid']]['url']} ~~~ ## 欄目列表 ~~~ {foreach $lists as $v} 內容輸出規則:{$v[字段名]} 標題:{$v['title']}內容鏈接:{$v['url']} 熱度/點擊量:{$v['hits']} 評論數:{$v['comment_num']} 所屬欄目id:{$v['tid']} 所屬欄目名:{$classtypedata[$v['tid']]['classname']} 所屬欄目URL:{$classtypedata[$v['tid']]['url']} 簡介:{$v['description']} 鏈接:{$v['url']} 縮略圖:{$v['litpic']} 內容:{$v['body']} 時間:[了解更多日期格式請查看附錄] 格式:年-月-日:{fun date('Y-m-d',$v['addtime'])} 格式:年-月-日 時:分:秒:{fun date('Y-m-d H:i:s',$v['addtime'])} 格式:年/月/日:{fun date('Y/m/d',$v['addtime'])} {/foreach} ~~~ ## 欄目分頁 ~~~ 默認輸出:{$pages} 自定義輸出: {if($lists)} #判斷是否有分頁數據 <ul class="pagination"> #判斷是否有前進頁碼 <li class="page-item {if(!$listpage['prev'])}disabled{/if}"> <a class="page-link" href="{$listpage['prev']}" aria-label="Previous"><span aria-hidden="true">?</span></a></li> #循環輸出分頁列表 {foreach $listpage['list'] as $ss} #$listpage['current_num']為當前頁頁碼,判斷是否為當前頁 #$ss['num']為頁碼,$ss['url']為分頁鏈接 <li class="page-item {if($ss['num']==$listpage['current_num'])}active background{/if}"><a href="{$ss['url']}" class="page-link">{$ss['num']}</a></li> {/foreach} #判斷是否有后退頁碼 <li class="page-item {if(!$listpage['next'])}disabled{/if}"><a class="page-link" href="{$listpage['next']}" aria-label="Next"><span aria-hidden="true">?</span></a></li> </ul> {/if} ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看