Created
April 19, 2011 21:05
-
-
Save danielres/929654 to your computer and use it in GitHub Desktop.
random personal notes and reminders related to my funny adventures with Refinery CMS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%# To enable theming: %> | |
<%= render :partial => "/shared/head", :locals => {:theme => true} %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
sections = [ | |
{:yield => :body_content_title, :fallback => page_title, :title => true}, | |
{:yield => :main, :fallback => @page[:body]}, | |
{:yield => :sub, :fallback => @page[:side_body]} | |
] | |
%> | |
<% content_for :foo do %> | |
<p>Link url: <%= @page.link_url %></p> | |
<% end %> | |
<% content_for :foo do %> | |
<p>Additional content</p> | |
<% end %> | |
<% content_for :foo do %> | |
<p>Even more content</p> | |
<% end %> | |
<% content_for :main do %> | |
<% content = yield :foo %> | |
<%= content.gsub(/BAR/, 'BARBAR') %> | |
<%= raw @page[:body] %> | |
<%= yield :foo %> | |
<% end %> | |
<%= render(:partial => "/shared/content_page", :locals => {:sections => sections}) %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment