Skip to content

Commit

Permalink
add hook to allow content sections to be rejected from the content_pa…
Browse files Browse the repository at this point in the history
…ge via :locals => {:hide_sections => [:body_content_title]} for example
  • Loading branch information
parndt committed Jun 9, 2010
1 parent 8866429 commit 2546dcc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<%
show_empty_sections ||= false
remove_automatic_sections ||= false
hide_sections ||= []

sections = [
{:yield => :body_content_title, :fallback => page_title, :id => 'body_content_page_title', :title => true},
{:yield => :body_content_left, :fallback => @page[:body]},
{:yield => :body_content_right, :fallback => @page[:side_body]}
]
].reject {|section| hide_sections.include?(section[:yield]) }

css = []
sections.each do |section|
Expand Down

0 comments on commit 2546dcc

Please sign in to comment.