首页>文档>程序>Eyoucms>Eyoucms模板标签之易优searchform搜索标签

此组别内的文章

需要支持?

如果通过文档没办法解决您的问题,请提交工单获取我们的支持!

Eyoucms模板标签之易优searchform搜索标签

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’

模板自定义:

搜索列表默认模板是 lists_search.htm,要实现不同模型展示模板不同,可以加上模型标识,格式:lists_search_模型ID.htm

比如:文章模型 lists_search_1.htm

产品模型 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=”请输入关键词” />
        <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}
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
有新私信 私信列表
搜索