【问题标题】:BOLT CMS - disable search for certain fieldBOLT CMS - 禁用搜索某些字段
【发布时间】:2017-09-15 09:12:18
【问题描述】:

是否有可能禁用对某些字段的搜索? 'button' 的 Searchweight 设置为 0 仍会根据他的内容显示搜索结果。我在 contenttypes.yml 中的代码:

foo:
show_in_menu: Bar
name: Foo Bar
taxonomy: [sorters]
fields:
    title:
        type: text
        group: General
    lead:
        type: textarea
        group: General
    url:
        type: text
        group: General
    button:
        type: text
        required: true
        pattern: ^.{1,15}$
        searchweight: 0
        group: Button
        label: Text on button
        postfix: Required, max 15 characters.

【问题讨论】:

    标签: php bolt-cms


    【解决方案1】:

    只需在您的内容类型区域中添加:searchable: false

    【讨论】:

    • 它适用于整个内容类型,不适用于指定字段(本例中为“按钮”)
    猜你喜欢
    • 2021-01-14
    • 2010-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多