Last active
August 29, 2015 14:11
-
-
Save notduncansmith/c6aa797625831b0eed3e to your computer and use it in GitHub Desktop.
Dynamic template globals in Summit
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
Summit = require 'summit' | |
app = new Summit() | |
router = app.router() | |
router.get '/', (respond, views) -> | |
respond views.app | |
router.get '/theme/:theme', (app, req) -> | |
app.templateGlobals.theme = req.params.theme | |
Summit.redirect '/' | |
app.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment