Introducing a common fragment
introduced th attribute common segments, three modes
th: insert
the common fragment of the entire insert element declaration to the introduced
th: replace
the element declarations introduced to replace the common segments
th: include
the contents of the segment to be introduced, into this tab comprising
Extracting the common segments
<footer th:fragment="copy">
2011
</footer>
The introduction of way
1 <div th:insert="footer :: copy"></div> 2 <div th:replace="footer :: copy"></div> 3 <div th:include="footer :: copy"></div>
Syntax ~ {template name is introduced (i.e. html) :: fragment name}
wavy lines, braces can write, can not write
However, writing in the row [[{~}]], [({} ~)]
must add {} ~