当前位置:网站首页>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 :
边栏推荐
- Is it safe to open an account in flush? What preparation is needed
- Wi-Fi 7 来啦,它到底有多强?
- Design of vga/lcd display controller system based on FPGA (Part 2)
- Task priority motion planning of floating base
- Cvpr2022 𞓜 thin domain adaptation
- 手机注册股票开户 炒股开户安全吗
- How to allow easydss online classroom system to upload an on-demand file with a space in the file name?
- Precautions for using JMeter suite to build a pressure test environment
- How to resolve the 35 year old crisis? Sharing of 20 years' technical experience of chief architect of Huawei cloud database
- Monitoring and warning | is the website attacked?
猜你喜欢

熬夜整理出的软件测试【高频】面试题大全(2022最新)

Jenkins 镜像无法更新插件中心的3种解决方法
An accident caused by a MySQL misoperation, and the "high availability" cannot withstand it!

【C语言刷题——Leetcode12道题】带你起飞,飞进垃圾堆

刚刚阿里面软件测试回来,3+1面任职阿里P7,年薪28*15薪

如何扩展aws主机上的磁盘空间

Wi-Fi 7 来啦,它到底有多强?

运营商5G用户渗透远远比4G慢,5G的普及还得看中国广电

国产芯片的赶超,让美国手机芯片龙头高通害怕了,出招应对竞争
Step by step introduction to sqlsugar based development framework (9) -- Realizing field permission control with WinForm control
随机推荐
Since the household appliance industry has entered the era of stock competition, why does Suning win the first channel for consecutive times?
VNC Viewer方式的远程连接树莓派
国产最长寿的热销手机,苹果也不是对手,总算让国产手机找回面子
Istio practical tips: Customize Max_ body_ size
证券账户理财安全吗??
QTreeWidget作为单例模式以dll返回的两个问题
Redis highly available
Kubernetes practical tips: using ksniff to capture packets
Design of vga/lcd display controller system based on FPGA (Part 2)
When installing Wireshark, npcap cannot be installed successfully. It is recommended to use WinPcap first
Design of CAN bus controller based on FPGA (Part 2)
Jenkins的便捷式安装
【Prometheus】6. Prometheus and kubernetes (incomplete)
在Gradle 中对Junit5 测试框架引用
openinstall携手书链:助力渠道数据分析,共创书联网时代
Decomposition of Uber dependency injection into dig source code analysis
Why is the blackmail virus that shut down half of America's energy system terrible? Interpretation of authoritative reports
From practical teaching to competition exercise, Tencent experts personally teach Ti-One platform operation strategy!
Motion planning of floating base robot
CVPR 2022 - Interpretation of selected papers of meituan technical team