add search page
This commit is contained in:
parent
47b8fe07e1
commit
e505bb4289
7 changed files with 85 additions and 2 deletions
14
site/controllers/search.php
Normal file
14
site/controllers/search.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
return function ($site) {
|
||||
|
||||
$query = get('q');
|
||||
$allEvents = page('programme')->children()->children();
|
||||
$results = $allEvents->search($query, 'title|text');
|
||||
|
||||
return [
|
||||
'query' => $query,
|
||||
'results' => $results,
|
||||
];
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue