数据调用-全站搜索标签写法 CMS3


全站搜索写法:

<form class="search-form" method="get" target="_blank" action="{SITE_URL}index.php">
    <input name="c" type="hidden" value="so">
    <input name="module" type="hidden" value="{MOD_DIR}">
   
  <input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword">
  <button class="btn" type="submit">搜索</button>
</form>


某个模块搜索写法:

<form class="search-form" method="get" target="_blank" action="{SITE_URL}index.php">
    <input name="s" type="hidden" value="{MOD_DIR}">
    <input name="c" type="hidden" value="search">

        <input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword">
       <button class="btn" type="submit">搜索</button>
               
</form>
{MOD_DIR}表示当前模块,你也可以写具体的模块目录


签名:这个人很懒,什么也没有留下!
最新回复 (0)
返回