Skip to content

Commit

Permalink
Fixed issue with landing pages
Browse files Browse the repository at this point in the history
  • Loading branch information
cliftonc committed Aug 15, 2011
1 parent a9fb4a4 commit 39f5c48
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions templates/blogLanding/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

var rootpath = process.cwd() + '/',
path = require('path'),
calipso = require(path.join(rootpath, 'lib/calipso')),
Query = require('mongoose').Query;
calipso = require(path.join(rootpath, 'lib/calipso')),
Query = calipso.lib.mongoose.Query;

exports = module.exports = function(req,options,callback) {

Expand Down
12 changes: 7 additions & 5 deletions templates/githubLanding/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var rootpath = process.cwd() + '/',
path = require('path'),
calipso = require(path.join(rootpath, 'lib/calipso')),
Query = require('mongoose').Query;
Query = calipso.lib.mongoose.Query;

exports = module.exports = function(req, options, callback) {

Expand All @@ -23,15 +23,17 @@ exports = module.exports = function(req, options, callback) {
var query = new Query({
'contentType': 'Github Feed'
});
options.getContentList(query, {

options.getContentList({contentType: 'Github Feed'}, {
req: req,
sortBy: 'published,desc',
limit: 30
sortBy: 'published,desc',
limit: 30
}, this.parallel());

}, function done(err, header, output) {

console.dir(output);

callback(err,{
header: header,
contents: output.contents,
Expand Down
6 changes: 3 additions & 3 deletions templates/guideLanding/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var rootpath = process.cwd() + '/',
path = require('path'),
calipso = require(path.join(rootpath, 'lib/calipso')),
Query = require('mongoose').Query;
Query = calipso.lib.mongoose.Query;

exports = module.exports = function(req,options,callback) {

Expand All @@ -20,11 +20,11 @@ exports = module.exports = function(req,options,callback) {
var query;
query = new Query();
query.where('taxonomy',/^guide.*/);

if(!options.user.isAdmin) {
query.where('status','published');
}

options.getContentList(query,{req:req,sortBy:'published,desc',pager:false},this.parallel());

},
Expand Down
6 changes: 3 additions & 3 deletions templates/quickstartLanding/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var rootpath = process.cwd() + '/',
path = require('path'),
calipso = require(path.join(rootpath, 'lib/calipso')),
Query = require('mongoose').Query;
Query = calipso.lib.mongoose.Query;

exports = module.exports = function(req,options,callback) {

Expand All @@ -20,11 +20,11 @@ exports = module.exports = function(req,options,callback) {
var query;
query = new Query();
query.where('taxonomy',/^quickstart.*/);

if(!options.user.isAdmin) {
query.where('status','published');
}

options.getContentList(query,{req:req,sortBy:'published,desc',pager:false},this.parallel());

},
Expand Down

0 comments on commit 39f5c48

Please sign in to comment.