Show more than one topic per category on the wide categories page. Disable support for the 2-column categories page. The category_featured_topics site setting controls how many topics to show.

This commit is contained in:
Neil Lalonde
2013-12-12 15:52:30 -05:00
parent 50c4e3707b
commit 6fa2e68742
10 changed files with 67 additions and 29 deletions
+3 -2
View File
@@ -9,10 +9,11 @@ class CategoriesController < ApplicationController
def index
@description = SiteSetting.site_description
wide_mode = SiteSetting.enable_wide_category_list
# TODO: remove this when we're sure about removing 2-column layout on categories page
# wide_mode = SiteSetting.enable_wide_category_list
options = {}
options[:latest_post_only] = params[:latest_post_only] || wide_mode
options[:latest_posts] = params[:latest_posts] || SiteSetting.category_featured_topics
@list = CategoryList.new(guardian,options)
@list.draft_key = Draft::NEW_TOPIC