You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In its current incarnation, the capturing helper is cut-and-paste. That is to say that the following
<p>Some text before</p>
<% content_for :summary do %>
<p>On this item, Nanoc is introduced, blah blah.</p>
<% end %>
<p>Some text after</p>
will output
<p>Some text before</p>
<p>Some text after</p>
If one wants the captured text where it was written, one has to paste it right after cutting it
<p>Some text before</p>
<% content_for :summary do %>
<p>On this item, Nanoc is introduced, blah blah.</p>
<% end %>
<%= content_for(@item, :summary) %>
<p>Some text after</p>
Or course <%= content_for(..., :summary) %> would be used elsewhere!
Desired behavior
But I have a use case where a paragraph is used as an introduction on several different pages. It would be nice to have an option to avoid typing <%= content_for(@item, :summary) %> just after the capturing context. Maybe something like.
<p>Some text before</p>
<% content_for :summary, cut: false do %>
<p>On this item, Nanoc is introduced, blah blah.</p>
<% end %>
<p>Some text after</p>
which would result in
<p>Some text before</p>
<p>On this item, Nanoc is introduced, blah blah.</p>
<p>Some text after</p>
as well as capturing the paragraph to be reused elsewhere. I.e. copy-and-paste.
The text was updated successfully, but these errors were encountered:
Current behaviour
In its current incarnation, the capturing helper is cut-and-paste. That is to say that the following
will output
If one wants the captured text where it was written, one has to paste it right after cutting it
Or course
<%= content_for(..., :summary) %>
would be used elsewhere!Desired behavior
But I have a use case where a paragraph is used as an introduction on several different pages. It would be nice to have an option to avoid typing
<%= content_for(@item, :summary) %>
just after the capturing context. Maybe something like.which would result in
as well as capturing the paragraph to be reused elsewhere. I.e. copy-and-paste.
The text was updated successfully, but these errors were encountered: