-
Notifications
You must be signed in to change notification settings - Fork 70
Any intention to add an 'include' tag to enable nested templates? #42
Comments
will this work for you ? <%- eco.render(fs.readFileSync('someTemplate.eco'), @ ) %> |
Hmm, possibly. I'm using eco in spinejs and I don't think I have implicit access to the eco module within the template... But am probably missing something. |
You might be able to global.eco = require('eco') ? Or pass the Eco reference into the context object, @eco = require('eco') Gene Tsai On Monday, March 19, 2012 at 3:33 AM, Steve Pike wrote:
|
I am compiling eco template using eco command-line and wondering the same thing -- how to nest templates? |
In my case, I'm sending the templates directly to the clients, and they all get stored in the "JST" variable (this is done automatically by Rails). To nest a template then, I use:
|
@sircambridge I try this: pass to the outer template the eco, fs, and templateDir object, in the template I do this:
But I get an error, whatever the partial contains some string, nochting (empty) or a variable print:
|
I've got a couple of cases where I have a template that I reuse within other templates and at the moment its a copy-paste job. Am I missing something?
Is this a reasonable feature request?
The text was updated successfully, but these errors were encountered: