【问题标题】:how can i exclude fields in typo3 search form?如何排除typo3搜索表单中的字段?
【发布时间】:2013-02-11 13:41:18
【问题描述】:

我有一个typo3 的网站,我想添加一个搜索表单(typo3 的搜索表单)。如何自定义搜索?我只想在页面的正文中搜索。我想排除元标题、关键字等字段。 谢谢你!我在一个网站上找到了这个,但我不知道在哪里修改

$TCA['tx_yourext_table'] = array(
    'ctrl' => array(
        'title' => 'Title of your table',
        'label' => 'title',
        'tstamp' => 'tstamp',
        'crdate' => 'crdate',
         // etc...
        'searchFields' => 'title, other_field, yet_other_field',
    ),
);

【问题讨论】:

    标签: typo3 typoscript


    【解决方案1】:

    在模板设置中试试这个:

    tt_content.search.20.allowedCols = tt_content.bodytext
    tt_content.search.30.dataArray.value = tt_content.bodytext
    

    在我的例子中,20 是 SEARCHRESULT 对象,30 是 FORM 对象;根据需要修改它们。

    默认值是这样的,仅供参考:

    pages.title-subtitle-keywords-description : tt_content.header-bodytext-imagecaption
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-24
      • 1970-01-01
      • 1970-01-01
      • 2012-05-30
      • 1970-01-01
      • 2022-06-09
      相关资源
      最近更新 更多