Questions tagged [template-engine]

A template engine is software that is designed to process templates and content information to produce output documents.

A template engine is software that is designed to process templates and content information to produce output documents, for example:


Paul Sweatte, in an answer to a now-deleted question, provided the following resources on the evolution of separating content from presentation and insights on the historical evolution of template engines:

The W3 Word Processor Filters page is essential reading that should cover most of the basics. For more details, here some resources on the evolution of separating content from presentation:

Markup and typesetting languages are the earliest examples of templating.
Here is the Wikipedia definition:

A markup language is a modern system for annotating a document in a way that is syntactically distinguishable from the text. The idea and terminology evolved from the "marking up" of manuscripts, i.e., the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts. Examples are typesetting instructions such as those found in troff and LaTeX, or structural markers such as XML tags.

Here is a diagram:

                RUNOFF                      "Generic Coding"                 "Editorial Structure Tags"
           (Jerome Saltzer, 1964)         (William Tunnicliffe, 1967)          (Stanley Rice, pre-1970)
                    |                               |                                     |
                    |                               |                                     |
TeX          roff - nroff - troff                   |-------------------------------------|  (Don Knuth, 1977)   (Josef Osanna, 1973)                   |
                                                   GML
                                            (Charles Goldfarb, 1969)
                                                    |                       SCRIBE
                                                    |                   (Brian Reid, 1980)
                                                    |                          |
                                                    |--------------------------|
                                                  SGML
                                              (Standard, 1980)
                                             |                |
                                             |                |
                                           HTML              XML
                                    (Berners-Lee, 1990)    (Standard, 1998)

As far as web site templating, SSI is the mother of them all.

1649 questions
0
votes
0 answers

Calling Ember.js helper from within View.render()

Is there a civilised way of calling an unbound helper from within Ember.js render()? I am forced to rewrite a bunch of templates as raw methods for the sake of performance. I would like to write: Ember.Handlebars.helpers.action.call(someObject, ...,…
julx
  • 8,694
  • 6
  • 47
  • 86
0
votes
1 answer

dustjs-linkedin with express 3

I am trying to get dustjs-linkedin working with an express 3 project, however I can't seem to get past this error: Error: Template name parameter cannot be undefined when calling dust.compile at Object.compiler.compile…
bqui56
  • 2,091
  • 8
  • 22
  • 40
0
votes
1 answer

How do I specify a specific path for a Razor template?

If I have the controller HomeController and action Index(), but I have my template in Views/Index.cshtml as opposed to Views\Home\Index.cshtml - is there a way for me to bypass the conventional loading mechanism to render the former?
Alexander Trauzzi
  • 7,277
  • 13
  • 68
  • 112
0
votes
1 answer

How does the doT.js Plugin for PHPstorm work?

I want to use doT.js-Templates in JetBrains PHPStorm. I found a plugin on the JetBrains Plugin-Site http://plugins.jetbrains.com/plugin/7327?pr=idea for doT-Templates. I installed it and restarted the IDE, but it doesn't seem like anything has…
0
votes
2 answers

How to parse basic template logic in PHP?

I'm trying to write a very basic template engine for a project and ended up taking the approach described in this article, which write template variables like [@variable] and to simply use str_replace() to parse the templates and put in the variable…
Nate
  • 26,164
  • 34
  • 130
  • 214
0
votes
1 answer

Play Framework Call a template in href

Is there a way to call a play framework view template in the a href tag? Something in the lines of: Click Here
joesan
  • 13,963
  • 27
  • 95
  • 232
0
votes
1 answer

Handlebar template handling with numbers

I've a JSON string like { "2013": [{ "01": {.... }, "01": {.....}, "02": {.....} }] } I've a template like this