Skip to content

Instantly share code, notes, and snippets.

@jeffreypriebe
Created November 20, 2015 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffreypriebe/f093c81c83d7ac5166b3 to your computer and use it in GitHub Desktop.
Save jeffreypriebe/f093c81c83d7ac5166b3 to your computer and use it in GitHub Desktop.
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}}');
});
@jeffreypriebe
Copy link
Author

Use in lib\core\routes.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment