Skip to content

Instantly share code, notes, and snippets.

@danielres
Created April 19, 2011 21:05
Show Gist options
  • Save danielres/929654 to your computer and use it in GitHub Desktop.
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
<%# To enable theming: %>
<%= render :partial => "/shared/head", :locals => {:theme => true} %>
<%
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