2013-02-11 41 views
1

我有一个typo3网站,我想添加一个搜索表单(typo3的搜索表单)。我如何定制搜索?我只想在页面的bodytext中搜索。我想排除元标题,关键字等字段。 谢谢!我发现这个网站上,但我不知道在哪里修改如何排除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', 
    ), 
); 

回答

0

使用这种尝试在模板设置:

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

在我的情况,20是信息搜索结果对象,30 FORM对象;根据需要修改它们。

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

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