Beispiel aus Thymeleaf-Doku ├╝berarbeitet
[website] / dist / templates / example / layout.html
index 82bd254..a5cad60 100644 (file)
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html th:fragment="layout (title, content)" xmlns:th="http://www.thymeleaf.org">
 <head>
-    <title th:replace="${title}">Layout Title</title>
+    <title th:replace="${title}?:_">Layout Title</title>
 </head>
 <body>
     <h1>Layout H1</h1>
-    <div th:replace="${content}">
+    <div th:replace="${content}?:_">
         <p>Layout content</p>
     </div>
     <footer>