联系官方销售客服

1835022288

028-61286886

应用插件 版主:官方插件技术组
搜索如果有数据就循环,如果没有数据,就从其他模块里循环出来
类型:迅睿CMS 更新时间:2024-05-16 13:56:04 module=MOD_DIR 搜索列表 没有数据 {$t.title} 内容建站系统
插件 建站系统 V3.14
应用作者 迅睿官方团队
发布时间 2022-03-01 15:30:06
更新时间 2024-09-04 17:25:35

搜索列表页  如果有数据就search循环出来,如果没有数据,就从其他模块里查询这个关键词的数据并循环出来,下面是我写的,求指正

     {if $sototal}
                                       
                        {search module=MOD_DIR id=$searchid total=$sototal order=$params.order catid=$catid page=1 pagesize=12 urlrule=$urlrule}
{$t.title}
        
              {/search}

                        {else}

                <div class="title"> <span>看一看其他模块的相关结果吧</span> </div>

{module module=wenda catid=0 order=updatetime num=10 cache=1 name=$keyword}
{$t.title}
 {/module}       
        
{/if}


插件教程:https://www.xunruicms.com/doc/app-928.html