{"action":"created","issue":{"url":"https://api.github.com/repos/assemble/assemble/issues/729","labels_url":"https://api.github.com/repos/assemble/assemble/issues/729/labels{/name}","comments_url":"https://api.github.com/repos/assemble/assemble/issues/729/comments","events_url":"https://api.github.com/repos/assemble/assemble/issues/729/events","html_url":"https://github.com/assemble/assemble/issues/729","id":88526595,"number":729,"title":"#each collection ... documentation needed","user":{"login":"stefanwalther","id":669728,"avatar_url":"https://avatars.githubusercontent.com/u/669728?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanwalther","html_url":"https://github.com/stefanwalther","followers_url":"https://api.github.com/users/stefanwalther/followers","following_url":"https://api.github.com/users/stefanwalther/following{/other_user}","gists_url":"https://api.github.com/users/stefanwalther/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanwalther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanwalther/subscriptions","organizations_url":"https://api.github.com/users/stefanwalther/orgs","repos_url":"https://api.github.com/users/stefanwalther/repos","events_url":"https://api.github.com/users/stefanwalther/events{/privacy}","received_events_url":"https://api.github.com/users/stefanwalther/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-15T20:08:29Z","updated_at":"2015-06-16T00:56:50Z","closed_at":null,"body":"Ohhh gosh,\r\n\r\nmy thinking was that as soon as I define\r\n\r\n```js\r\nassemble.pages( './docs/pages/**/*.md' );\r\n```\r\n\r\nit will be added to be used in handlebars as\r\n\r\n```html\r\n{{#each pages}}\r\n   bla\r\n{{/each}}\r\n```\r\n\r\nNow I realized that this isn't the case.\r\nIs this just misleading, a bug, a wad???\r\nWhat am I missing here?\r\n\r\nRegards\r\nStefan"},"comment":{"url":"https://api.github.com/repos/assemble/assemble/issues/comments/112247261","html_url":"https://github.com/assemble/assemble/issues/729#issuecomment-112247261","issue_url":"https://api.github.com/repos/assemble/assemble/issues/729","id":112247261,"user":{"login":"jonschlinkert","id":383994,"avatar_url":"https://avatars.githubusercontent.com/u/383994?v=3","gravatar_id":"","url":"https://api.github.com/users/jonschlinkert","html_url":"https://github.com/jonschlinkert","followers_url":"https://api.github.com/users/jonschlinkert/followers","following_url":"https://api.github.com/users/jonschlinkert/following{/other_user}","gists_url":"https://api.github.com/users/jonschlinkert/gists{/gist_id}","starred_url":"https://api.github.com/users/jonschlinkert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonschlinkert/subscriptions","organizations_url":"https://api.github.com/users/jonschlinkert/orgs","repos_url":"https://api.github.com/users/jonschlinkert/repos","events_url":"https://api.github.com/users/jonschlinkert/events{/privacy}","received_events_url":"https://api.github.com/users/jonschlinkert/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T00:56:50Z","updated_at":"2015-06-16T00:56:50Z","body":"Maybe these will help, change them to get views from whatever collection you want:\r\n\r\n```js\r\nassemble.asyncHelper('post', function (name, options, cb) {\r\n  var file = this.app.views.posts[name];\r\n  if (typeof options === 'function') {\r\n    cb = options;\r\n    options = {};\r\n  }\r\n\r\n  file.render(this.context, function (err, content) {\r\n    if (err) return cb(err);\r\n    console.log(content);\r\n    return cb(null, content);\r\n  });\r\n});\r\n\r\nassemble.asyncHelper('posts', function(options, cb) {\r\n  if (typeof options === 'function') {\r\n    cb = options;\r\n    options = {};\r\n  }\r\n  var ctx = this.context;\r\n  var posts = this.app.views.posts;\r\n  var keys = Object.keys(posts);\r\n\r\n  async.map(keys, function (key, next) {\r\n    posts[key].render(ctx, function (err, content) {\r\n      if (err) return next(err);\r\n      next(null, content);\r\n    });\r\n  }, function (err, res) {\r\n    if (err) return cb(err);\r\n    console.log(res)\r\n    cb(null, res.join('\\n'));\r\n  });\r\n});\r\n```"}}