I had my first go at the kirby router. However, things are not going very smoothly at the moment.
c::set('routes', array(
array(
'pattern' => 'en/contact/thank-you',
'action' => function() {
site()->visit('kontakt', 'en'); // apparently needed in multilang routers?
$data = array('thanks' => '...');
return array('kontakt', $data);
}
)
));
This leads to:
Catchable fatal error: Argument 1 passed to Kirby::render() must be an instance of Page, boolean given, called in /var/www/html/kirby/kirby.php on line 626 and defined in /var/www/html/kirby/kirby.php on line 489
on the feature/Models branch of kirby.
How can I pass additional data to my template?