Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cs.step(
- function getPageInfo() {
- var self = this;
- collection.find({}, {limit:10}).toArray(function(err, docs) {
- for (var i in docs) {
- tags = '';
- for (var j in docs[i].tags) {
- tags += docs[i].tags[j] + ' ';
- }
- outputHolder = { header : docs[i].header, content: docs[i].content, tags: tags };
- posts.push(outputHolder);
- }
- });
- },
- function getAllTags(err, data) {
- var self = this;
- collection.find({ tags: {$exists: true }}, {limit:10}).toArray(function(err, docs) {
- return(docs);
- });
- },
- function render(err, data1, data2) {
- // now I want everything from above
- console.log(data1);
- console.log(data2);
- /*res.render('index', {
- title: data.pageTitle,
- content: data.pageSubtitle,
- output: data.pageContent
- });*/
- }
- );
Add Comment
Please, Sign In to add comment