当前位置:网站首页>th:include的使用
th:include的使用
2022-07-08 00:53:00 【海涛高软】
<head th:include="相对于templates的地址/include :: header"></head> <div th:include="album/include :: footer"></div>

th:include 和 th:replace 都可以引入模块,两者的区别在于:
th:include:引入子模块的 children,依然保留父模块的 tag
th:replace:引入子模块的所有,不保留父模块的 tag
举个例子
<footer th:fragment="copy">
© 2018 Copyright by holyong.
</footer>
引入界面
<body>
...
<div th:include="footer :: copy"></div>
<div th:replace="footer :: copy"></div>
</body>
显示结果
<body>
...
<div>
© 2018 Copyright by holyong.
</div>
<footer>
© 2018 Copyright by holyong.
</footer>
</body>边栏推荐
- 生命的高度
- Keras深度学习实战——基于Inception v3实现性别分类
- Unity 射线与碰撞范围检测【踩坑记录】
- C language -cmake cmakelists Txt tutorial
- Thread deadlock -- conditions for deadlock generation
- Applet running under the framework of fluent 3.0
- [knowledge atlas paper] minerva: use reinforcement learning to infer paths in the knowledge base
- Give some suggestions to friends who are just getting started or preparing to change careers as network engineers
- Introduction to grpc for cloud native application development
- Semantic segmentation | learning record (3) FCN
猜你喜欢

Completion report of communication software development and Application

2022国内十大工业级三维视觉引导企业一览

XMeter Newsletter 2022-06|企业版 v3.2.3 发布,错误日志与测试报告图表优化

Give some suggestions to friends who are just getting started or preparing to change careers as network engineers

《ClickHouse原理解析与应用实践》读书笔记(7)

Clickhouse principle analysis and application practice "reading notes (8)

A comprehensive and detailed explanation of static routing configuration, a quick start guide to static routing

image enhancement

文盘Rust -- 给程序加个日志

Alo who likes TestMan
随机推荐
力扣6_1342. 将数字变成 0 的操作次数
JVM memory and garbage collection-3-runtime data area / method area
Reading notes of Clickhouse principle analysis and Application Practice (7)
力扣4_412. Fizz Buzz
Xmeter newsletter 2022-06 enterprise v3.2.3 release, error log and test report chart optimization
云原生应用开发之 gRPC 入门
Leetcode question brushing record | 485_ Maximum number of consecutive ones
Ml backward propagation
直接加比较合适
Disk rust -- add a log to the program
Beaucoup d'enfants ne savent pas grand - chose sur le principe sous - jacent du cadre orm, non, ice River vous emmène 10 minutes à la main "un cadre orm minimaliste" (collectionnez - le maintenant)
Introduction to ADB tools
nmap工具介紹及常用命令
Where to think
2022国内十大工业级三维视觉引导企业一览
PHP calculates personal income tax
CorelDRAW2022下载安装电脑系统要求技术规格
The way fish and shrimp go
Cross modal semantic association alignment retrieval - image text matching
[knowledge map paper] Devine: a generative anti imitation learning framework for knowledge map reasoning