hogan-express-partials
Express middleware for adding path-based partials support to hogan-express.
Install
Install hogan-express-partials using [npm][4]:
npm install hogan-express-partials
Usage
Setup
To use hogan-express-partials
var partials = ; app;app;app;app; app;
Using a path-based partial
In a layout or partial, you can include views-relative paths to other partials.
appget '/' reqres-> reslocals = name: 'Jacob' resrender 'template'
If layout.html
contained:
Message Layout {{{ yield }}}
and template.html
contained:
{{ name }} says {{> @components/message }}
and message.html
or message/index.html
was located in the components
folder under views
and it contained
Hello World.
the callback would produce
Message Layout Jacob says Hello World.
See hogan-express for more documentation.