Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

What is a template engine?

  • We would like to create several texts (e.g. web pages, content of email, some report) that look exactly the same but will have different data.

  • We design the page, but instead of values we use vairables (or placeholders, if you prefer that word) that look like this: {{ ttitle }}.

  • The template engine then can replace those placeholder variables by the appropriate value.

  • Besides replacing individual values, a template system usually has more complex syntax as well. Loops, conditionals, includes etc.