---
title: "Templating in Dotkernel3"
description: "Dotkernel3 replaces its 10-year-old templating engine with Twig, gaining layouts, loops, variables, and escaping while keeping the familiarity of HTML."
author: "Jesper"
date_published: "2017-12-20"
canonical_url: "https://www.dotkernel.com/dotkernel/templating-in-dotkernel3/"
category: "Dotkernel"
language: "en"
---

# Templating in Dotkernel3

## TL;DR

Dotkernel3 moved from its previous, 10-year-old templating engine to the popular Twig Templating Engine, gaining layouts, loops, variables, and escaping, while giving developers the familiarity of HTML with the overview and convenience of PHP.

## Why the switch was made

One of the pain points in the previous version of Dotkernel was the templating engine.
Although it was solid and robust, it was also 10 years old and used techniques that had become slightly outdated.

## What Twig brings to Dotkernel3

Templates can now be written as HTML code with extra Twig tags.
Twig is powerful and includes features such as:

- Layouts
- Loops
- Variables
- Escaping

The templating engine in Dotkernel3 gives the familiarity of HTML with the overview and convenience of PHP.

## FAQ

**Q: Which templating engine does Dotkernel3 use?**
A: Dotkernel3 moved to the popular Twig Templating Engine.

**Q: Why did Dotkernel move away from the previous templating engine?**
A: The previous templating engine, although solid and robust, was also 10 years old and used techniques that had become slightly outdated, and it was one of the pain points in the previous version of Dotkernel.

**Q: What features does Twig bring to Dotkernel3 templates?**
A: Templates can now be written as HTML code with extra Twig tags, and Twig includes features such as layouts, loops, variables, and escaping, giving the familiarity of HTML with the overview and convenience of PHP.

**Q: Where can I read the official Twig templating documentation for Dotkernel?**
A: The official documentation is available at [twig.symfony.com](https://twig.symfony.com/).

## Resources

- [Twig Templating Engine](https://twig.symfony.com/)
