It' great, we can generate an app with Hogan.js support, because Hogan.js is really fast an usually partials are possible. So my question: How can we use partials with Express? Or is this feature still disabled in Express? I tried to get it working, but somehow it doesn't. :-/
On Saturday, September 1, 2012 9:52:39 PM UTC-3, Felix Weiss wrote:
> It' great, we can generate an app with Hogan.js support, because Hogan.js > is really fast an usually partials are possible. So my question: How can we > use partials with Express? Or is this feature still disabled in Express? I > tried to get it working, but somehow it doesn't. :-/
On Saturday, September 1, 2012 9:52:39 PM UTC-3, Felix Weiss wrote:
> It' great, we can generate an app with Hogan.js support, because Hogan.js > is really fast an usually partials are possible. So my question: How can we > use partials with Express? Or is this feature still disabled in Express? I > tried to get it working, but somehow it doesn't. :-/
> It' great, we can generate an app with Hogan.js support, because Hogan.js > is really fast an usually partials are possible. So my question: How can we > use partials with Express? Or is this feature still disabled in Express? I > tried to get it working, but somehow it doesn't. :-/
> Am Sonntag, 2. September 2012 02:52:39 UTC+2 schrieb Felix Weiss:
>> It' great, we can generate an app with Hogan.js support, because Hogan.js >> is really fast an usually partials are possible. So my question: How can we >> use partials with Express? Or is this feature still disabled in Express? I >> tried to get it working, but somehow it doesn't. :-/
> It' great, we can generate an app with Hogan.js support, because Hogan.js > is really fast an usually partials are possible. So my question: How can we > use partials with Express? Or is this feature still disabled in Express? I > tried to get it working, but somehow it doesn't. :-/
If you keep having a lot of problems with this, it might be worth
checking out a different templating engine. I wrote nunjucks, a port
of jinja2, because I was having these kinds of problems over and over.
> Am Sonntag, 2. September 2012 02:52:39 UTC+2 schrieb Felix Weiss:
>> It' great, we can generate an app with Hogan.js support, because Hogan.js
>> is really fast an usually partials are possible. So my question: How can we
>> use partials with Express? Or is this feature still disabled in Express? I
>> tried to get it working, but somehow it doesn't. :-/
> To post to this group, send email to express-js@googlegroups.com.
> To unsubscribe from this group, send email to
> express-js+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/express-js?hl=en.
> If you keep having a lot of problems with this, it might be worth
> checking out a different templating engine. I wrote nunjucks, a port
> of jinja2, because I was having these kinds of problems over and over.
> > Am Sonntag, 2. September 2012 02:52:39 UTC+2 schrieb Felix Weiss:
> >> It' great, we can generate an app with Hogan.js support, because Hogan.js
> >> is really fast an usually partials are possible. So my question: How can we
> >> use partials with Express? Or is this feature still disabled in Express? I
> >> tried to get it working, but somehow it doesn't. :-/
> > To post to this group, send email to express-js@googlegroups.com.
> > To unsubscribe from this group, send email to
> > express-js+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/express-js?hl=en.
On Thursday, September 27, 2012 4:43:50 PM UTC+1, tjholowaychuk wrote:
> this is just the nature of hogan... most mustaches do not perform any > IO, thus > you can't really use layouts or partials unless you load them in first
> On Sep 27, 6:41 am, James Long <longs...@gmail.com> wrote: > > If you keep having a lot of problems with this, it might be worth > > checking out a different templating engine. I wrote nunjucks, a port > > of jinja2, because I was having these kinds of problems over and over.
I just released mmm specifically for this problem. It uses Hogan.js and brings in support for partials, layout and caching. It was built specifically for Express 3.
On Saturday, September 1, 2012 8:52:39 PM UTC-4, Felix Weiss wrote:
> It' great, we can generate an app with Hogan.js support, because Hogan.js > is really fast an usually partials are possible. So my question: How can we > use partials with Express? Or is this feature still disabled in Express? I > tried to get it working, but somehow it doesn't. :-/
We just open-sourced our own solution, h4e ("hogan for express"). We use it to have Express use hogan with support for partials and layouts, and also to directly render Mustache templates (e.g. for emails we send our users). As TJ says, there is no two ways around it, all templates are precompiled and cached (it takes ver little time, ~1ms per template).
> I just released mmm specifically for this problem. It uses Hogan.js and > brings in support for partials, layout and caching. It was built > specifically for Express 3.
> On Saturday, September 1, 2012 8:52:39 PM UTC-4, Felix Weiss wrote:
>> It' great, we can generate an app with Hogan.js support, because Hogan.js >> is really fast an usually partials are possible. So my question: How can we >> use partials with Express? Or is this feature still disabled in Express? I >> tried to get it working, but somehow it doesn't. :-/
This is using handlebars, another mustache-based implementation; it adds easy-to-use support for partials, layouts, and blocks, and it exports itself as an express 3 view engine.
I prefer the simplicity of a mustache type templating engine over jade or other ejs solutions, and this module extends the basic functionality to give you a fully featured view engine.