Skip to content
Browse files

Pass page_num to the template

  • Loading branch information...
1 parent 2721f51 commit ccdcc764f416a892e3fa471253cfa0f8c9aecd1f Guy Halford-Thompson committed Feb 13, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/glog.js
View
3 lib/glog.js
@@ -180,7 +180,8 @@ Glog.prototype.render_blog = function(options, articles, cb) {
'title' : options.blog_title,
'analytics_code' : options.analytics_code || null,
'base_url' : options.base_url || '',
- 'articles' : articles.slice(start, end)
+ 'articles' : articles.slice(start, end),
+ 'page_num' : end === articles.length ? -1 : (i+1) // If we are on the last page, pass -1 so we know there are no more pages
});
// pages[/] === pages[_page1]

0 comments on commit ccdcc76

Please sign in to comment.
Something went wrong with that request. Please try again.