Created
May 29, 2015 14:17
-
-
Save prismicdeveloper/421cfbaecaceded8f3db to your computer and use it in GitHub Desktop.
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
// This goes to the app/app.php file, before the "page" route to take priority | |
// Let's add a route for our event type | |
$app->get('/event/:uid', function ($uid) use($app, $prismic) { | |
$doc = $prismic->by_uid('event', $uid); | |
if (!$doc) { | |
not_found($app); | |
return; | |
} | |
$skin = $prismic->get_skin(); | |
render($app, "event", array('single_post' => $doc, 'skin' => $skin)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment