Link Search Menu Expand Document

Getting started

On this page

  1. Installation
  2. Usage


A minimum of Java 8 and Thymeleaf 3.x is required. Add the layout dialect by configuring Maven or your Maven-compatible dependency manager to the following co-ordinates:

  • GroupId:
  • ArtifactId: thymeleaf-layout-dialect
  • Version: 3.2.0

Check the project releases for a list of available versions. Each release page also includes a downloadable JAR if you want to manually add it to your project classpath.


Configure Thymeleaf to include the layout dialect using one of the methods below:

  • Spring or Spring Boot w/ Java/annotation config:
    public LayoutDialect layoutDialect() {
      return new LayoutDialect();
  • DIY management of the Thymeleaf template engine:
    TemplateEngine templateEngine = new TemplateEngine();
    templateEngine.addDialect(new LayoutDialect());

This will introduce the layout namespace, and 5 new attribute processors that you can use in your templates: decorate, title-pattern, insert, replace, and fragment.

Continue on to the processors section to learn how to use these in your templates.