Umstellung auf Thymeleaf: Schritt 2 - Tilesunterstützung aktiviert
[website] / src / main / webapp / thymeleaf / templates / layout.html
diff --git a/src/main/webapp/thymeleaf/templates/layout.html b/src/main/webapp/thymeleaf/templates/layout.html
new file mode 100644 (file)
index 0000000..f019b46
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:tiles="http://www.thymeleaf.org">
+  <head>
+    <!--/* Tiles attribute will be put here at runtime */-->
+    <title tiles:include="title">Title</title>
+  </head>
+  <body>
+    <!--/* Standard layout can be mixed with Tiles */-->
+    <div th:replace="templates/header :: fragment">HEADER</div>
+    <div class="container">
+      <!--/* Tiles attribute will be put here at runtime */-->
+      <h1 tiles:include="title">Title</h1>
+      <!--/* Tiles attribute will be put here at runtime */-->
+      <div tiles:replace="content">
+        <!-- ============================================================================ -->
+        <!-- This content is only used for static prototyping purposes (natural templates)-->
+        <!-- and is therefore entirely optional, as this markup fragment will be included -->
+        <!-- from "fragments/header.html" at runtime.                                     -->
+        <!-- ============================================================================ -->
+        <h1>Content</h1>
+        <p>
+          Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+          Praesent scelerisque neque neque, ac elementum quam dignissim interdum.
+          Phasellus et placerat elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+          Praesent scelerisque neque neque, ac elementum quam dignissim interdum.
+          Phasellus et placerat elit.
+        </p>
+      </div>
+    </div>
+    <!--/* Standard layout can be mixed with Tiles */-->
+    <div th:replace="templates/footer :: fragment">FOOTER</div>
+  </body>
+</html>
\ No newline at end of file