1
votes

i have a website in typo3 and i want to add a search form (typo3's search form). how can i customize the search? i want to search only in page's bodytext. I want to exlude fields such as meta title, keywords etc. thank you! I found this on a website, but I don't know where to modify

$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',
    ),
);
1

1 Answers

0
votes

Try it in template setup using this:

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

In my case, 20 is the SEARCHRESULT object, 30 is the FORM object; modify them as necessary.

The default values are something like this, just for reference:

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