RandomEtc / ejs-locals

Express 3.x layout, partial and block template functions for the EJS template engine.
298 stars 63 forks source link

now support contentFor #30

Closed sr3d closed 11 years ago

sr3d commented 11 years ago

Inspired by ejs-layout, I update the code to support contentFor block with following syntax:

inside the view

<%- contentFor('leftNav') -%>
<ul>
 ...
</ul>

<%- contentFor('someOtherSection') -%>
....

inside the layout

<%- contentFor.leftNav -%>
.. // snipped ...
<%- contentFor.someOtherSection -%>