taglib_hotwords 熱門搜索
【基礎用法】
標簽:taglib_hotwords
描述:獲取招聘搜索的熱門關鍵字
用法:
{eyou:weapptaglib name="('Recruits', 'taglib_hotwords', ['num'=>'6','maxlength'=>'10','empty'=>'目前沒有熱搜關鍵詞'])" id='field'} {eyou:if condition="!empty($field['url'])"} <a href="{$field.url}" class="hotword substring for-event">{$field.word}</a> {eyou:else /} {$field.word} {/eyou:if} {/eyou:weapptaglib}
屬性:
num='' 關鍵詞數目
maxlength='' 關鍵詞最大長度
empty='' 沒有數據時顯示的文案
mod='' 每隔N行輸出的內容
id='' 可以任意指定循環里的變量名替代field,假設id='field1',模板調用如:{$field.word} 變成 {$field1.word}
涉及表字段:
無
【更多示例】
-------------------------------示例1--------------------------------
描述:每隔3條輸出文檔記錄
{eyou:weapptaglib name="('Recruits', 'taglib_hotwords', ['num'=>'6','maxlength'=>'10','empty'=>'目前沒有熱搜關鍵詞'])" id='field' mod='3'}
{eyou:if condition="!empty($field['url'])"}
{eyou:eq name='mod' value='0'}
<a href="{$field.url}" class="hotword substring for-event">{$field.word}</a>
{/eyou:eq}
{eyou:else /}
{$field.word}
{/eyou:if}
{/eyou:weapptaglib}
文檔最后更新時間:2023-11-23 11:10:07
未解決你的問題?請到「問答社區」反饋你遇到的問題