午夜91福利视频,午夜成人在线观看,午夜在线视频免费观看,午夜福利短视频,精品午夜成人免费视频APP

searchform 搜索標簽

【基礎用法】
標簽: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}
屬性:
type='default' 默認搜索方式,如果指定typeid屬性,想實現連同子分類一起搜索,可以設置 type='sonself'
typeid='' 默認搜索所有欄目的文檔標題,可以指定欄目id搜索,也可以在不同欄目搜索當前欄目的文檔,比如:typeid='$eyou.field.typeid'
modelid='' 默認搜索所有模型的文檔標題,可以指定模型id搜索,也可以在不同欄目所在模型搜索當前模型的文檔,比如:modelid='$eyou.field.current_channel'


模板自定義:

搜索列(lie)表(biao)默認模(mo)板是 lists_search.htm,要實現(xian)不同模(mo)型(xing)展示模(mo)板不同,可以加上(shang)模(mo)型(xing)標識(shi),格(ge)式:lists_search_模(mo)型(xing)ID.htm

比如:文章模型 lists_search_1.htm

&nbsp;         產品模型 lists_search_2.htm

        &nbsp; 圖(tu)集模型 lists_search_3.htm

          下載模型 lists_search_4.htm

          視頻模型(xing) lists_search_5.htm

&nbsp;         專題模型 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="請輸入關鍵詞" />
        <input type="submit" name="btn" value="搜索" />
        {$field.hidden}
    </form>
{/eyou:searchform}

-------------------------------示例2--------------------------------
描述:指定產品模型搜索
{eyou:searchform type='sonself' modelid='2'}
    <form class="sidebar-search" method="get" action="{$field.action}">
        <input type="text" class="form-control" name="keywords" placeholder="請輸入關鍵詞" />
        <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="請輸入關鍵詞" />
        <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="請輸入關鍵詞" />
        <input type="submit" name="btn" value="搜索" />
        {$field.hidden}
    </form>
{/eyou:searchform}


文檔最后更新時間:2024-08-14 16:08:22

文檔
目錄

深色
模式

切換
寬度