当前位置:网站首页>How to use nested tags in thymeleaf3 Tags
How to use nested tags in thymeleaf3 Tags
2022-06-24 15:38:00 【Exclusive rainy days】
Suppose in a Thymeleaf3 Template , You want to use the following operations . In one use Thymeleaf3 Under the label of grammar , Nesting uses another Thymeleaf3 Grammar tags .
<h1 th:text="${header.title}" >
title
<small th:text="${header.subtitle}" >Subtitle</small>
</h1>
The result you want to generate is
<h1>
title
<small>Subtitle</small>
</h1>
But the actual result is
<h1>
title
</h1>
The feasible scheme is as follows :
- Use the inline scheme
<h1 th:inline="text" >
[[${header.title}]]
<small th:text="${header.subtitle}">Subtitle</small>
</h1>
- Or use the remove tag scheme
<h1>
<span th:text="${header.title}" th:remove="tag">title</span>
<small th:text="${header.subtitle}" >Subtitle</small>
</h1>
Reference documents :
边栏推荐
- Allwinner a40i industrial Internet gateway design scheme, smart site, smart city core gateway
- Chaos mesh in Tencent -- Tencent mutual entertainment chaotic engineering practice
- asciinema 搭配 asciicast2gif 实现高效的命令行终端录制能力
- Mysql之Binlog
- Design of vga/lcd display controller system based on FPGA (Part 2)
- 为什么企业实施WMS仓储管理系统很容易失败
- Wi-Fi 7 来啦,它到底有多强?
- Unimelb COMP20008 Note 2019 SM1 - Data formats
- 如何实现容器内的SqlServer的数据库迁移
- Step by step introduction to sqlsugar based development framework (9) -- Realizing field permission control with WinForm control
猜你喜欢

高速公路服务区智能一体机解决方案

Mysql之Binlog

还在担心漏测吗?快来使用jacoco统计下代码覆盖率

Intelij 中的 Database Tools可以连接但是无法显示SCHEMA, TABLES
Step by step introduction to sqlsugar based development framework (9) -- Realizing field permission control with WinForm control

Multimeter resistance measurement diagram and precautions

国产最长寿的热销手机,苹果也不是对手,总算让国产手机找回面子

How to generate assembly code using clang in Intel syntax- How to generate assembly code with clang in Intel syntax?

刚刚阿里面软件测试回来,3+1面任职阿里P7,年薪28*15薪
![clang: warning: argument unused during compilation: ‘-no-pie‘ [-Wunused-command-line-argument]](/img/f0/42f394dbc989d381387c7b953d2a39.jpg)
clang: warning: argument unused during compilation: ‘-no-pie‘ [-Wunused-command-line-argument]
随机推荐
如何在Thymeleaf3标签中使用嵌套标签
Wide measuring range of jishili electrometer
Istio FAQ: 431 request header fields too large
Carry forward the fine style of continuous operation and go all out to ensure the safety of Beijiang Levee
Intelij 中的 Database Tools可以连接但是无法显示SCHEMA, TABLES
Chaos mesh in Tencent -- Tencent mutual entertainment chaotic engineering practice
How to allow easydss online classroom system to upload an on-demand file with a space in the file name?
Domestic payment system and payment background construction
FreeRTOS新建任务不执行问题解决办法
【C语言刷题——Leetcode12道题】带你起飞,飞进垃圾堆
Actual combat | a tortuous fishing counteraction
Bosun query
Improving the classification of motor imagery by combining EEG and MEG signals in BCI
Low fidelity prototype vs high fidelity prototype, which one is more suitable for your design?
Istio practical tips: Customize Max_ body_ size
Is it safe to open an account for flush stock on mobile phone!
Design of CAN bus controller based on FPGA (Part 2)
Junit5中的参数化测试(Parameterized Tests)指南
Is it safe to open a stock account by mobile phone
asciinema 搭配 asciicast2gif 实现高效的命令行终端录制能力