Skip to content

头条新闻 / 置顶新闻

无效的问题

同步勾选:

以下代码未经实际使用, 仅 AI 提供

html
<hlx-template
  component-type="newsPage"
  component-query-option="{'columnIds':[{{ conf.column.人大要闻.id }}],'start':0,'count':1,'showMedium':'PC','newsType':['HEADLINE']}"
  component-variable="topNewsList"
></hlx-template>
<hlx-template
  component-type="newsPage"
  component-query-option="{'columnIds':[{{ conf.column.人大要闻.id }}],'start':0,'count':1,'showMedium':'PC' }"
  component-variable="firstNewsList"
></hlx-template>

<th:block th:if="${ #lists.size(topNewsList) > 0 }">
  <div class="top-news-title">[[${topNewsList[0].listTitle}]]</div>
  <div class="top-news-desc">[[${topNewsList[0].listContent}]]</div>
</th:block>
<th:block
  th:if="${ #lists.size(topNewsList ) == 0 and #lists.size(firstNewsList) > 0 }"
>
  <div class="top-news-title">[[${firstNewsList[0].listTitle}]]</div>
  <div class="top-news-desc">[[${firstNewsList[0].listContent}]]</div>
</th:block>