Class: Knitkit::WebsiteSectionsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/knitkit/website_sections_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#view_current_publication, #website

Instance Method Details

#indexObject



4
5
6
7
8
9
10
11
12
13
# File 'app/controllers/knitkit/website_sections_controller.rb', line 4

def index
  @current_user = current_user
  @contents = Article.find_published_by_section(@active_publication, @website_section)
  layout = @website_section.get_published_layout(@active_publication)
  unless layout.nil?
    @website_section.render_base_layout? ? (render :inline => layout, :layout => 'knitkit/base') : (render :inline => layout)
  else
    @website_section.render_base_layout? ? (render) : (render :layout => false)
  end
end