Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何排除typo3搜索表单中的字段?_Typo3_Typoscript - Fatal编程技术网

如何排除typo3搜索表单中的字段?

如何排除typo3搜索表单中的字段?,typo3,typoscript,Typo3,Typoscript,我有一个网站在typo3,我想添加一个搜索表单(typo3的搜索表单)。如何自定义搜索?我只想在页面的正文中搜索。我想排除诸如元标题、关键字等字段。 非常感谢。我在一个网站上找到了这个,但我不知道在哪里修改 $TCA['tx_yourext_table'] = array( 'ctrl' => array( 'title' => 'Title of your table', 'label' => 'title', 'tst

我有一个网站在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',
    ),
);

在模板设置中使用以下方法进行尝试:

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