1 <?php
2
3 class Search_Controller extends Page_Controller {
4
5 function Link($action = null) {
6 return Controller::join_links(Director::baseURL(), 'search');
7 }
8
9 10 11
12
13 function SearchActive() {
14 return isset($_REQUEST['Search']);
15 }
16
17 function results($d = array(), $form = false){
18 if (!$form)
19 return false;
20 $form->setPageLength(20);
21 $form->classesToSearch(array('SiteTree'));
22 $data = array(
23 'Results' => $form->getResults(),
24 'Query' => $form->getSearchQuery(),
25 'Title' => _t('Webylon.SEARCH_RESULTS','Search Results')
26 );
27
28 return $this->renderWith(array('Search', 'Page'),$data);
29 }
30
31 function Title() {
32 return _t('Webylon.SEARCH', 'Search');
33 }
34
35 function getClassName() {
36 return 'Search';
37 }
38 }
39
40
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-