Last active
July 27, 2017 19:04
-
-
Save bastianallgeier/7275f1a4513c5dce0611 to your computer and use it in GitHub Desktop.
Sample route setup for Kirby 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
c::set('routes', array( | |
array( | |
'pattern' => 'projects/old-project-url-for-project-a', | |
'action' => function() { | |
go('projects/project-a'); | |
} | |
), | |
array( | |
'pattern' => 'blog/archive/(:num)/(:num?)/(:num?)', | |
'action' => function($year, $month = null, $day = null) { | |
return array('blog/archive', array( | |
'year' => $year, | |
'month' => $month, | |
'day' => $day | |
)); | |
} | |
) | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can you get the returned array in your template?