FFan丶Blog / 迅睿CMS / / 迅睿CMS内容模块搜索

迅睿CMS内容模块搜索

分类:迅睿CMS 发布时间:2022-07-11 10:42:20来源:FFan丶Blog
内容模块搜索框写法: <form class="search-form" action="/index.php" method="get"> <input type="hidden" name="s" value="news">...

内容模块搜索框写法:

<form class="search-form" action="/index.php" method="get">

<input type="hidden" name="s" value="news">

<input type="hidden" name="c" value="search">

<input type="text" placeholder="搜索内容..." name="keyword">

<input type="submit" value="提交搜索" >

</form>

注意:s的news参数是指定模块目录

搜索列表标签循环写法:


{search module=MOD_DIR id=$searchid total=$sototal order=$params.order catid=$catid page=1 pagesize=5 urlrule=$urlrule return=rs}

当前行数(从1开始):{$key_rs+1} 当前行数(从0开始):{$key_rs}

标题:{$rs.title}

地址:{$rs.url}

描述:{$rs.description}  截取20字 {dr_strcut($rs.description, 20)}

缩略图: {dr_thumb($rs.thumb, 200, 200)} 判断有无缩略图:{if $rs.thumb}有的{else}没有{/if}

时间:{$rs.updatetime} 自定义时间:{dr_date($rs._updatetime, 'Y-m-d')}

所属栏目;{dr_cat_value($rs.catid, 'name')} 栏目地址:{dr_cat_value($rs.catid, 'url')}

{/search}

分页:{$pages_rs}

如果显示栏目模型字段,需要加参数more=1

搜索栏目基本信息:

当前栏目ID:$catid  单独调用{$catid}

栏目名称:{$cat.name}

栏目地址:{$cat.url}

栏目缩略图:{dr_get_file($cat.thumb)}

SEO标题 {$cat['setting']['seo']['list_title']}

SEO关键字 {$cat['setting']['seo']['list_keywords']}

SEO描述 {$cat['setting']['seo']['list_description']}



猜你喜欢

  • 根目录新建.htaccess文件 DirectoryIndex index.html index.php

    SEO2020-01-15
  • 以下是以 m.二级域名绑定到子目录/m/为例的.htaccess代码. <IfModule mod_rewrite.c>

    SEO2020-01-15
  • 根目录新建.htaccess文件 RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\\. RewriteCond %{HTTP_HOST} !^$

    SEO2020-01-15
  • 一、PC站所有页面跳转同一手机页面 function is_mobile() { var regex_match = /(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|

    部分JS效果2020-01-15
  • 快速把excel合并在一起,方便分析和统计可以利用excel表的宏计算就可以实现。方法如下: 1、我们需要把多个excel表都放在同一个文件夹里面,并在这个文件夹里面新建一个excel。

    其他2020-01-15