Created
November 20, 2015 17:07
-
-
Save jeffreypriebe/f093c81c83d7ac5166b3 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
app.all('/keystone/{SINGLE_ITEM_MODEL}', function(req, res, next) { | |
req.params.list = '{SINGLE_ITEM_MODEL}'; | |
req.params.item = keystone.get({Id of Single Item}); | |
next(); | |
}, initList(true), require('../../admin/routes/views/item')); | |
app.all('/keystone/{SINGLE_ITEM_MODEL}/:item', function(req, res, next) { | |
res.redirect('/keystone/{SINGLE_ITEM_MODEL}}'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use in lib\core\routes.js