diff --git a/app/helpers/blog_helper.rb b/app/helpers/blog_helper.rb index 702f496..69e2a2a 100644 --- a/app/helpers/blog_helper.rb +++ b/app/helpers/blog_helper.rb @@ -17,13 +17,13 @@ module BlogHelper _('Configure blog') end - def list_posts(articles, format = 'full') + def list_posts(articles, format = 'full', paginate = true) pagination = will_paginate(articles, { :param_name => 'npage', :previous_label => _('« Newer posts'), :next_label => _('Older posts »'), :params => {:action=>"view_page", :page=>articles.first.parent.path.split('/'), :controller=>"content_viewer"} - }) if articles.present? + }) if articles.present? && paginate content = [] artic_len = articles.length articles.each_with_index{ |art,i| diff --git a/app/views/content_viewer/blog_page.html.erb b/app/views/content_viewer/blog_page.html.erb index d48ec35..8645ec3 100644 --- a/app/views/content_viewer/blog_page.html.erb +++ b/app/views/content_viewer/blog_page.html.erb @@ -9,13 +9,15 @@