var keystone = require('../../'),
	async = require('async');

exports = module.exports = function(req, res) {
	/*var view = new keystone.View(req, res),
		locals = res.locals;

	// Init locals
	locals.section = 'home';
	locals.data = {
		posts: []
	};

	// Load the posts
	view.on('init', function(next) {
		
		var q = keystone.list('Post').paginate({
				page: req.query.page || 1,
				perPage: 10,
				maxPages: 10
			})
			.where('state', 'published')
			.sort('-publishedDate')
			.populate('author categories');
				
		q.exec(function(err, results) {
			locals.data.posts = results;
			locals.data.posts = '111';
			next(err);
		});
		
	});
	data: locals.data,
*/
	keystone.render(req, res, 'home', {
		section: 'home',
		page: 'home',		
		orphanedLists: keystone.getOrphanedLists()
	});
};
