Skip to content

Commit

Permalink
omitted module added
Browse files Browse the repository at this point in the history
  • Loading branch information
will-r committed Apr 12, 2010
1 parent 17b2be0 commit 29bbee0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/share_layouts/controller_extensions.rb
@@ -0,0 +1,18 @@
module ShareLayouts::ControllerExtensions

def layout_for(area = :public)
if defined? Site && current_site && current_site.respond_to?(:layout_for)
current_site.layout_for(area)
elsif area_layout = Radiant::Config["#{area}.layout"]
area_layout
elsif main_layout = Layout.find_by_name('Main')
main_layout.name
elsif any_layout = Layout.first
any_layout.name
end
end

end



0 comments on commit 29bbee0

Please sign in to comment.