Questions tagged [templating-engine]

A templating engine processes templates in a given language, often binding them to a data source, in order to produce an output document.

templating-engine is a software designed for processing web templates, filling them with data and producing web documents.

See wikipedia article.

Also see:

115 questions
351
votes
8 answers

What are the differences between Mustache.js and Handlebars.js?

Major differences I've seen are: Handlebars adds #if, #unless, #with, and #each Handlebars adds helpers Handlebars templates are compiled (Mustache can be too) Handlebars supports paths Allows use of {{this}} in blocks (which outputs the current…
52
votes
15 answers

Can you recommend a .net template engine?

I am looking for a .net templating engine - something simple, lightweight, stable with not too many dependencies. All I need it for at the moment is creating templated plain text and html emails. Can anyone give me a good recommendation? If it…
serg10
  • 28,946
  • 16
  • 65
  • 92
21
votes
8 answers

Any advances on John Resig's "JavaScript Micro-Templating"?

So I've seen this post on JavaScript Micro-Templating by John Resig and I have a need for a micro-templating engine like this. But he saids in the post that he'll keep a more-refined version in his Secrets of the JavaScript ninja book and also…
chakrit
  • 57,172
  • 24
  • 125
  • 160
12
votes
2 answers

Pass JavaScript object/hash to Handlebars helper?

Is it possible to pass a JavaScript object/hash into a Handlebars helper call? I'd like to do something like this: {{#textField {'id':'text_field_1', 'class':'some-class', size:30} }}{{/textField}}

Help text…

Chad Johnson
  • 18,956
  • 30
  • 98
  • 192
10
votes
1 answer

What are the main differences between HAML, SASS/Compass and ERB?

I'm looking for a templating engine. What are the important factors to consider when choosing among HAML, SASS/Compass and ERB?
Yen
  • 2,156
  • 3
  • 19
  • 27
8
votes
2 answers

MEAN stack - reliance on templating (Angular vs Templating Engines)?

This may come from a lack of experience on the various sections of the MEAN stack, but from the various boilerplates I've seen (mean.io, hackathon-starter, etc.) in the app.js code, there is always a call to using jade templating engine. I know that…
Robert
  • 1,617
  • 4
  • 32
  • 59
7
votes
3 answers

JS templating system with Backbone.js

I am looking at some good templating systems to be used alongwith an MVC framework like Backbone.js I am aware of one such system (jQuery Templating). However, the same has been discontinued for some reasons and hence I am looking at some other good…
testndtv
  • 43,898
  • 91
  • 265
  • 396
7
votes
3 answers

Twitter typeahead.js: Possible to use Angular JS as template engine? If not how do I replace "{{}}" for Hogan/Mustache js?

I am working with twitter's typeahead.js and I was wondering if it was possible to modify hogan.js to use something other than {{}}? I am looking at the minified code now and I have no idea what to change for something so simple. Doing a find and…
meiryo
  • 9,201
  • 12
  • 42
  • 50
6
votes
4 answers

How to indent content of included template

I am using go templates to create yaml definitions for kubernetes. I am trying to nest templates but run into issues where I can't re-use a definition simply because the indention is wrong when included. I.e., in one case the contents need…
dirtbikejunkie
  • 431
  • 5
  • 4
5
votes
2 answers

How to create a custom Twig function class, without using a static method?

I can create a Twig extension for my project like this class Functions extends Twig_Extension{ public function getName(){return 'foobar';} public function getFunctions() { return array( 'loremipsum' => new…
SkaveRat
  • 1,889
  • 3
  • 16
  • 30
4
votes
1 answer

Repeat string multiple times in Jekyll

How do you repeat string multiple times in Jekyll? For eg: in Python, you can do "hello" * 5 to get 'hellohellohellohellohello'. In Jekyll is there an easier way of doing the same thing than this. {% for i in (1..5) %} Hello {% endfor…
Ishan
  • 2,935
  • 11
  • 30
  • 50
4
votes
4 answers

Can any Java based templating engine work with Websphere Commerce?

I'm a UX developer at a retail company, we use Websphere Commerce for our e-com sites. The app dev guys are in complete control of the HTML output we have to file bugs with them to get something as simple as an ID changed in HTML. HTML and front end…
belshire
  • 51
  • 4
4
votes
1 answer

Freemarker page break

I'm using Apache freemarker to construct PDF document reports. I have a situation when half of my page is full of text and I need to add a table below it. Table size is dynamic and sometime it fits in the same page with the text and sometimes not,…
Tomas
  • 962
  • 3
  • 11
  • 25
4
votes
1 answer

How to endif in Flask Jinja2 templating engine. Getting TemplateSyntaxError: expected token 'end of statement block', got 'session'

I'm building a website using the Flask Framework and I now run into an error which I don't understand. For the simple base.html file I pasted below I'm gettig a TemplateSyntaxError: expected token 'end of statement block', got 'session', even though…
kramer65
  • 39,074
  • 90
  • 255
  • 436
4
votes
1 answer

View templates and routes in node.js with AngularJS

Trying to understand how to implement AngularJS in a node.js express app. After setting up express, I need 2 things: routing and a template engine, so normally I would need to do as follows to set the app to use Jade templating engine: …
Amc_rtty
  • 3,221
  • 9
  • 40
  • 69
1
2 3 4 5 6 7 8