From 321940fbf4d3a862872efee9f66f0d29904526ed Mon Sep 17 00:00:00 2001 From: candlerb Date: Thu, 12 Aug 2010 13:45:49 -0700 Subject: [PATCH] Migrated from getting-liquid-to-work-in-rails v7 --- Getting-Liquid-to-Work-in-Rails.textile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Getting-Liquid-to-Work-in-Rails.textile b/Getting-Liquid-to-Work-in-Rails.textile index 7c39a2d..2bdd242 100644 --- a/Getting-Liquid-to-Work-in-Rails.textile +++ b/Getting-Liquid-to-Work-in-Rails.textile @@ -27,6 +27,16 @@ Liquid: {{ 'This is a long section of text' | truncate: 3 }} #=> Thi... +h3. Using .liquid as a layout + +Insert +
+{{ content_for_layout }}
+
+in your liquid layout where you would put @<%= yield %>@ in an erb layout. + +Note: if you are collecting content with @<%= content_for :foo do %> ... <% end %>@ then there is currently no way to access this in a liquid layout. + h2. Using Rails model data and methods in Liquid templates