Closed robi42 closed 14 years ago
I pushed a basic include implementation to http://github.com/earl/ringojs/tree/skins-include.
<% include name=n resource=r %>
adds the skin created from resource r
as subskin n
, allowing it to be used just as an internal subskin. The name
parameter is optional, defaulting to the resource path. The named argument resource
can also be given as first positional argument.
So the minimal usage example would probably be:
<% include ./foo.html %>
<% render ./foo.html %>
Which includes a skin created from ./foo.html
as subskin named ./foo.html
. This subskin is then immediately rendered.
thanks! have you considered doing this without the <% include %>, i.e. just loading the external skin if no internal subskin exists with the given name?
ok, updated my branch to get rid of the include.
merged mainline in 7164ef4c5f516b073dba52f693f3221b7b01d54c.
E.g.,
<% include ./foo.html %>
(this would render external./foo.html
skin resource as subskin named./foo.html
).