<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] ## 站點模塊標簽 站點模塊標簽調用的是后臺站點模塊數據,支持圖集,多媒體,HTML內容,內容數據模塊。 ## 簡單示例 ~~~ {hkcms:adv name="home-banner"} <div style="background-image:url({$item.image});"> 數組的索引:{$key} 循環變量:{$i},第幾次循環,從1開始。 </div> {/hkcms:adv} ~~~ ## 參數 <blockquote class="danger"><p>HkCms_v2.1.210909之后版本itemid獲取的是排序序號。以添加圖集時的順序,從1開始</p></blockquote> | 參數名稱 | 可選值 | 默認值 | 是否必填 | 說明 | | --- | --- | --- | --- | --- | | name | - | - | 是 | 模塊標識,即后臺站點模塊里面的標識,每一個模塊都有標識 | | itemid | - | - | - | 模塊子項序號,用于顯示特定圖集、視頻 | | cache | - | 3600秒 | - | 緩存時間,默認3600秒 | | id | - | $item | - | 指定循環里的變量名,例如id='obj',模板調用如:{$item.title} 變成 {$obj.title} | | empty | - | - | - | 為空的時候輸出提示,支持傳入html | | currentstyle | - | active | - | 指定選中的圖片,class名稱具體看下面示例 | | current | - | 1 | - | 指定第幾個選中,默認active class給到第一個 | | num | 格式為數字,或傳入變量 | - | - | 限制數量 | - `name`,模塊唯一標識,值為站點模塊添加時所填寫的標識,如下圖所示 ![](https://img.kancloud.cn/96/7c/967c6235de33d41282826de36f5ccbd0_621x227.png) - `currentstyle`,選中的class,例如class等于active,假設第二張圖片為加載頁面后首先看到的,那么current="2",第二張圖集currentstyle里面就有值為active。控制哪個圖片有active就首先顯示出來。 ~~~ {hkcms:adv name="home_banner" currentstyle="active" current="2"} // 只有第二張才有currentstyle才有值,這里是文字演示,具體的要根據你的輪播圖插件來。 <a href="{$item.url}" class="{$item.currentstyle}">{$item.title}</a> {/hkcms:adv} ~~~ ## 獲取圖集 假設獲取默認演示數據的`home_banner`標識的圖集 ~~~ {hkcms:adv name="home_banner"} 圖片:{$item.image} <br> 圖集標題:{$item.title} <br> 圖集描述:{$item.notes} <br> 跳轉地址:{$item.url} <br> a標簽跳轉方式:{$item.target} <br> 選中的class:{$item.currentstyle} <br> {/hkcms:adv} ~~~ a標簽跳轉方式由添加圖集時是否開啟新窗口打開,開啟后target就會等于:target=_blank。 ~~~ {hkcms:adv name="home_banner"} <a href="{$item.url}" {$item.target}>{$item.title}</a> {/hkcms:adv} ~~~ 結果示例 ~~~ <a href="#" target="_blank">宣傳視頻</a> ~~~ 只獲取第二張圖片,使用itemid參數 ~~~ {hkcms:adv name="home_banner" itemid="2"} <img src="image"> {/hkcms:adv} ~~~ **常用字段說明** 注意:其中`$item`變量根據id參數影響,默認是:$item | 字段名 | 說明 | 調用方式 | | --- | --- | --- | |type | 類型,1=圖集,2=多媒體,3=html,4=內容數據,5=文字鏈接 | {$item.type} | |title | 圖集里面的標題 | {$item.title} | |image | 圖片地址 | {$item.image} | |url | 跳轉地址 | {$item.url} | |notes | 描述 | {$item.notes} | |weigh | 排序 | {$item.weigh} | |currentstyle | class值,選中的圖片才有值 | {$item.currentstyle} | |target | 標簽跳轉方式 | {$item.target} | |recommend | 一維數組,圖集組的信息 | - | |name | 圖集組的標識名稱 | {$item.recommend.name} | |remark | 圖集組標題 | {$item.recommend.remark} | ## 獲取多媒體 基本與圖集使用一致,唯一的區別是資源地址是content字段 ~~~ // 假設多媒體標識名叫video,那么如下獲取 {hkcms:adv name="video"} 資源地址:{$item.content} <br> 標題:{$item.title} <br> 描述:{$item.notes} <br> 跳轉地址:{$item.url} <br> a標簽跳轉方式:{$item.target} <br> 選中的class:{$item.currentstyle} <br> {/hkcms:adv} ~~~ **常用字段說明** 注意:其中`$item`變量根據id參數影響,默認是:$item | 字段名 | 說明 | 調用方式 | | --- | --- | --- | |type | 類型,1=圖集,2=多媒體,3=html,4=內容數據,5=文字鏈接 | {$item.type} | |title | 多媒體類型標題 | {$item.title} | |content | 資源地址 | {$item.image} | |url | 跳轉地址 | {$item.url} | |notes | 描述 | {$item.notes} | |weigh | 排序 | {$item.weigh} | |currentstyle | class值,選中的圖片才有值 | {$item.currentstyle} | |target | 標簽跳轉方式 | {$item.target} | |recommend | 一維數組,組的信息 | - | |name | 組的標識名稱 | {$item.recommend.name} | |remark | 組的標題 | {$item.recommend.remark} | ## 獲取HTML 假設HTML標識名叫`links`,那么如下獲取 ~~~ {hkcms:adv name="links"} {$item.content} // 輸出HTML {/hkcms:adv} ~~~ **常用字段說明** 注意:其中`$item`變量根據id參數影響,默認是:$item | 字段名 | 說明 | 調用方式 | | --- | --- | --- | |content | 資源地址 | {$item.image} | |recommend | 一維數組,組的信息 | - | |name | 組的標識名稱 | {$item.recommend.name} | |remark | 組的標題 | {$item.recommend.remark} | ## 獲取內容數據 字段是根據選擇的模型而定的,字段名可前往模型管理》字段管理里面設置。 獲取內容數據示例: ~~~ {hkcms:adv name="ceshi"} 文檔標題:{$item.title} {/hkcms:adv} ~~~ ## 獲取文字鏈接 ~~~ {hkcms:adv name="link"} 標題:{$item.title} <br> 描述:{$item.notes} <br> 跳轉地址:{$item.url} <br> a標簽跳轉方式:{$item.target} <br> 選中的class:{$item.currentstyle} <br> {/hkcms:adv} ~~~ **常用字段說明** 注意:其中`$item`變量根據id參數影響,默認是:$item | 字段名 | 說明 | 調用方式 | | --- | --- | --- | |title | 標題 | {$item.title} | |url | 跳轉地址 | {$item.url} | |notes | 描述 | {$item.notes} | |weigh | 排序 | {$item.weigh} | |currentstyle | class值,選中的圖片才有值 | {$item.currentstyle} | |target | 標簽跳轉方式 | {$item.target} | |recommend | 一維數組,圖集組的信息 | - | |name | 圖集組的標識名稱 | {$item.recommend.name} | |remark | 圖集組標題 | {$item.recommend.remark} |
                  <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>

                              哎呀哎呀视频在线观看