straightdave / eps

A templating engine for PowerShell

Home Page:http://straightdave.github.io/eps/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Support for partial templates

fourpastmidnight opened this issue · comments

I just want to take a moment and say that when I went searching for templating in PowerShell, this was at the top of the search results. And after looking through the examples and ReadMe, it seems to be a really nice templating DSL. I'm working on porting a JavaScript library, which is making use of handlebars templates, and I'm considering (strongly) taking a dependency on this to achieve a similar effect! Thanks for making this!

I don't see that there is any support for "partial templates". It would be nice to be able to split up larger templates, especially those which may contain conditional or repetitive sections, into several smaller templates, and have a "master" template reference the partial templates.

(P.S. I know this repo hasn't been updated in a while, so I'm just opening this request so it has visibility. Depending on my time and my project requirements, this may be something I could look into adding—no promises—but, in case anyone else is so inclined, here's the request 😉 )

Have not tried but did you try calling Invoke-EpsTemplate. from a template?

<%= Invoke-EpsTemplate -Template 'PARTIAL... <%= $name %> %>