Hello
I'm trying to extend the search form to include data beyond the default specified in the FulltextSearchable file but am not sure I understand the annotation.
/*
Enable the default configuration of MySQL full-text searching on the given data classes.
It can be used to limit the searched classes, but not to add your own classes.
For this purpose, please use {@link Object::add_extension()} directly:
<code>
MyObject::add_extension("FulltextSearchable('MySearchableField,'MyOtherField')");
</code>
Caution: This is a wrapper method that should only be used in _config.php,
and only be called once in your code.
@param Array $searchableClasses The extension will be applied to all DataObject subclasses
listed here. Default: {@link SiteTree} and {@link File}.
*/
From this I understand that you can't just add them in as below:
public static function enable($searchableClasses = array('SiteTree', 'File', 'GalleryPage_Images')) {
$defaultColumns = array(
'SiteTree' => '"Title","MenuTitle","Content","MetaDescription"',
'File' => '"Filename","Title","Content"',
'GalleryPage_Images' => '"Caption"'
);
Do I need to create a custom version of the file FulltextSearchable and if wo where would this need to be stored? Or do I create a new function within the FulltextSearchable file?
Thanks