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

文档
目录

深色
模式

切换
宽度