mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
11 lines
551 B
JavaScript
11 lines
551 B
JavaScript
![]() |
Template[getTemplate('postsLoadMore')].helpers({
|
||
|
hasMorePosts: function(){
|
||
|
// as long as we ask for N posts and all N posts showed up, then keep showing the "load more" button
|
||
|
return parseInt(Session.get('postsLimit')) == this.postsCount
|
||
|
},
|
||
|
loadMoreUrl: function () {
|
||
|
var count = parseInt(Session.get('postsLimit')) + parseInt(getSetting('postsPerPage', 10));
|
||
|
var categorySegment = Session.get('categorySlug') ? Session.get('categorySlug') + '/' : '';
|
||
|
return '/' + Session.get('view') + '/' + categorySegment + count;
|
||
|
}
|
||
|
});
|