Hi, a bit struggeling with routes
A single route like that, works fine in my Plugin:
$kirby->set('route',
array(
'method' => 'GET',
'pattern' => 'student/liste/small',
'action' => function () {
return array("my_template", get_my_data() );
} ) );
but multiple routes are allway redirect to homepage,…
$kirby->set('route', array(
array (
'method' => 'GET',
'pattern' => 'student/liste/small',
'action' => function () { return array("my_small_template", get_small_data() ); }
), array (
'method' => 'GET',
'pattern' => 'student/liste/large',
'action' => function () { return array("my_large_template", get_large_data() ); }
)
) );
Every route works fine in the above single route code-pattern, but all routes get redirect to home with a 302 Error with the second code snippet… i dont see whats missing there… any hint is welcome