【发布时间】:2014-05-27 07:43:51
【问题描述】:
这是百里香代码
这里 2 th:如果条件被检查并且网页中可见 2 个标题
这里我只想在网页中看到真正的条件语句标题
用户的值列表值
条件是有任何已登录的用户,标题为sellerhome,并且没有已登录的用户列表为空,因此主页标题显示在网页上
<div th:each="s,pStat : ${Users} ">
<div th:if="${s ==null}" th:unless="${pStat.index > 0}">
<header th:include="../templates/homeTemplate :: header" id="header">
</header>
</div>
<div th:else="${s != null} " th:unless="${pStat.index > 0}" >
<header th:include="../templates/SellerTemplate :: header" id="header">
</header>
</div>
</div>
【问题讨论】:
-
你应该尝试更好地表达自己,因为这个问题很难阅读:)
-
@geo 我知道,但我的语言很糟糕
-
我明白,但人们可能无法弄清楚你想做什么:)
标签: html if-statement thymeleaf