ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 搜索结果页 search.html > 具备参数有: > {$word} : 搜索的关键词 > 数据列表: > {foreach $lists as $v} > 具备参数与article、product一致 > {/foreach} > ``` {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} ```