Code in my lib folder:
include Nanoc3::Helpers::Capturing
Code in my item:
<% content_for :column do %>
<p>This is content for the second column.</p>
<% end %>
Code in my layout:
<div id="column2">
<%= render "navigation/#{@item[:section]}" %>
<%= @item[:content_for_column] %>
</div>
Nothing is "captured" and the paragraph just shows up like regular
item content in <%= yield %>.
> My site has 2 columns and I'm trying to capture content from inside an
> item page and then call it from the second column div inside my
> layout. This is so that I don't have layout divs (the column divs) in
> my items.
>
> [..]
>
> Nothing is "captured" and the paragraph just shows up like regular
> item content in <%= yield %>.
Hi,
This should work… I’ve tested it with a blank nanoc site and the result is as expected. Are you sure that the item is filtered with ERB?
Regards,
Denis
--
Denis Defreyne
denis.d...@stoneship.org
wow... please, shoot me now... :P
>> Are you sure that the item is filtered with ERB?
>
> wow... please, shoot me now... :P
KABLAM!
--
Denis Defreyne
denis.d...@stoneship.org