Sha256: 11f41c6405be6759791673d26bc86f031b9397adae66fdf53aae6ee75c58958f

Contents?: true

Size: 672 Bytes

Versions: 2

Compression:

Stored size: 672 Bytes

Contents

module Knitkit
  class WebsiteSectionsController < BaseController

    def index
      @contents = Article.find_published_by_section(@active_publication, @website_section)
      layout = @website_section.get_published_layout(@active_publication)

      if params[:is_mobile]
        layout.nil? ? (render :layout => false) : (render :inline => layout, :layout => false)
      elsif layout.nil?
        @website_section.render_base_layout? ? (render) : (render :layout => false)
      else
        @website_section.render_base_layout? ? (render :inline => layout, :layout => 'knitkit/base') : (render :inline => layout)
      end

    end
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
knitkit-3.2.0 app/controllers/knitkit/website_sections_controller.rb
knitkit-3.0.0 app/controllers/knitkit/website_sections_controller.rb