Hi
I'm using standard search form function
function SearchForm() {
$searchText = isset($this->Query) ? $this->Query : '';
$fields = new FieldSet(
new TextField("Search", "", $searchText)
);
$actions = new FieldSet(
new FormAction('results', 'find product')
);
return new SearchForm($this, "SearchForm", $fields, $actions);
}
/**
* Process and render search results
*/
function results($data, $form){
if($form->getSearchQuery() == NULL) {
$data = array(
'Results' => '',
'Query' => '',
'Title' => 'Your results'
);
} else {
$data = array(
'Results' => $form->getResults(),
'Query' => $form->getSearchQuery(),
'Title' => 'Your results'
);
}
return $this->customise($data)->renderWith(array('Results_Page', 'Page'));
}
but it also searchs image files
if file has a name for example:
kitchen_image_2.jpg
and i want to search "kitchen" , one of the results is this image
also if i have a folder "kitchen" with many images, they also are including to search result
so my question is
how to block image searching ?