- 全局標簽
- artlist 文章列表
- models 欄目列表
- modelsartlist 頻道循環(huán)
- type 指定欄目
- include 引用模板
- arcview 單條文檔
- position 面包屑
- assign 定義變量
- empty 為空判斷
- notempty 不為空判斷
- foreach 循環(huán)輸出
- volist 數(shù)據(jù)循環(huán)
- if 條件判斷
- switch 條件判斷
- compare 變量比較
- adv 廣告列表
- load 文件加載
- global 全局變量
- field 字段值
- tags 標簽調(diào)用
- searchform 搜索標簽
- 常用函數(shù)
- links 友情鏈接
- SQL 數(shù)據(jù)查詢
- weapp 應(yīng)用插件
- range 范圍判斷
- for 數(shù)據(jù)循環(huán)
- ad 單條廣告
- attribute 欄目屬性
- user 會員信息
- diyurl 內(nèi)鏈調(diào)用
- php標簽
- hotkeywords 熱門搜索
- notice 站內(nèi)信
- asklist 問答列表
- citysite 城市站點
- navigation 導(dǎo)航菜單
- static 文件引入
- 會員信息(memberlist)
- 會員注銷標簽使用方法
- 列表標簽
- 內(nèi)容標簽
- arcclick 點擊數(shù)
- guestbookform 欄目留言
- beafter 上下篇
- downcount 下載次數(shù)
- relevarticle 相關(guān)文檔
- 擴展標簽
- videoplay 視頻播放
- videolist 視頻列表
- memberinfos 文檔關(guān)聯(lián)的會員信息
- attribute 商品參數(shù)
- specialnode 專題文檔
- collect 文檔收藏
- collectnum 收藏數(shù)
- comment 商品評價
- articlepay 文章付費
- downloadpay 下載付費
- form 自由表單
- sppurchase 商品購買
- 商品其它標簽欄
- 可視化標簽
- 多語言標簽
searchform 搜索標簽
【基礎(chǔ)用法】
標簽:searchform
描述:文檔標題搜索,默認搜索整站
用法:
{eyou:searchform type='sonself'}
<form method="get" action="{$field.action}">
<input type="text" name="keywords" />
<input type="submit" value='點擊搜索' />
{$field.hidden}
</form>
{/eyou:searchform}
<form method="get" action="{$field.action}">
<input type="text" name="keywords" />
<input type="submit" value='點擊搜索' />
{$field.hidden}
</form>
{/eyou:searchform}
屬性:
type='default' 默認搜索方式,如果指定typeid屬性,想實現(xiàn)連同子分類一起搜索,可以設(shè)置 type='sonself'
type='default' 默認搜索方式,如果指定typeid屬性,想實現(xiàn)連同子分類一起搜索,可以設(shè)置 type='sonself'
typeid='' 默認搜索所有欄目的文檔標題,可以指定欄目id搜索,也可以在不同欄目搜索當前欄目的文檔,比如:typeid='$eyou.field.typeid'
modelid='' 默認搜索所有模型的文檔標題,可以指定模型id搜索,也可以在不同欄目所在模型搜索當前模型的文檔,比如:modelid='$eyou.field.current_channel'
modelid='' 默認搜索所有模型的文檔標題,可以指定模型id搜索,也可以在不同欄目所在模型搜索當前模型的文檔,比如:modelid='$eyou.field.current_channel'
模板自定義:
搜索列表默認模板是 lists_search.htm,要實現(xiàn)不同模型展示模板不同,可以加上模型標識,格式:lists_search_模型ID.htm
比如:文章模型 lists_search_1.htm
產(chǎn)品模型 lists_search_2.htm
圖集模型 lists_search_3.htm
下載模型 lists_search_4.htm
視頻模型 lists_search_5.htm
專題模型 lists_search_7.htm
……
涉及表字段:
無
【更多示例】
-------------------------------示例1--------------------------------
描述:整站搜索
{eyou:searchform type='sonself'}
<form class="sidebar-search" method="get" action="{$field.action}">
<input type="text" class="form-control" name="keywords" placeholder="請輸入關(guān)鍵詞" />
<input type="submit" name="btn" value="搜索" />
{$field.hidden}
</form>
{/eyou:searchform}
-------------------------------示例2--------------------------------
描述:指定產(chǎn)品模型搜索
{eyou:searchform type='sonself' modelid='2'}
<form class="sidebar-search" method="get" action="{$field.action}">
<input type="text" class="form-control" name="keywords" placeholder="請輸入關(guān)鍵詞" />
<input type="submit" name="btn" value="搜索" />
{$field.hidden}
</form>
{/eyou:searchform}
-------------------------------示例3--------------------------------
描述:指定欄目搜索
{eyou:searchform type='sonself' typeid='2'}
<form class="sidebar-search" method="get" action="{$field.action}">
<input type="text" class="form-control" name="keywords" placeholder="請輸入關(guān)鍵詞" />
<input type="submit" name="btn" value="搜索" />
{$field.hidden}
</form>
{/eyou:searchform}
-------------------------------示例4--------------------------------
描述:跟隨自定義搜索列表模板
{eyou:searchform type='sonself' modelid='$eyou.field.current_channel'}
<form class="sidebar-search" method="get" action="{$field.action}">
<input type="text" class="form-control" name="keywords" placeholder="請輸入關(guān)鍵詞" />
<input type="submit" name="btn" value="搜索" />
{$field.hidden}
</form>
{/eyou:searchform}
文檔最后更新時間:2024-08-14 16:08:22
未解決你的問題?請到「問答社區(qū)」反饋你遇到的問題