Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var keystone = require('keystone');
- var Product = keystone.list('Product');
- exports = module.exports = function (req, res) {
- var view = new keystone.View(req, res);
- var locals = res.locals;
- locals.filters = {
- product : req.params.product
- }
- // locals.section is used to set the currently selected
- // item in the header navigation.
- locals.section = 'store';
- view.query('products', keystone.list('Product').model.find());
- // Render the view
- view.render('store');
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement