Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support passing of blocks and content to partials #50

Open
martinheidegger opened this issue Jan 6, 2014 · 1 comment
Open

Support passing of blocks and content to partials #50

martinheidegger opened this issue Jan 6, 2014 · 1 comment

Comments

@martinheidegger
Copy link

Partials are nice but it is difficult to pass in a huge block of html to a partial.

Say we have this template 'test.ect'

<div class="houses">
   <% content %>
</div>

then it would be cool to do something like:

<% include "test.ect" : %>
   <div>A</div>
<% end %>
<% include "test.ect" : %>
  <div>B</div>
<% end %>
@paulyoung
Copy link

I relied on this a lot in Jade. Would be a good addition.

It appears that something like this is possible now:

test.ect

<div class="houses">
   <% content 'test-content' %>
</div>

other.ect

<% block 'test-content' : %>
  <div>A</div>
<% end %>

<% include 'test' %>

Admittedly this is a workaround, and can't be used more than once because of #79.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants