文章(zhāng)标題 ${content.title}
文章(zhāng)路(lù)徑 ${content.url}
文章(zhāng)詳情内容 ${content.text}
浏覽量${content.views}
欄目id ${content.channelId}
文章(zhāng)排序值 order 0默認排序 1按發布時間正序 2按發布時間倒叙 3訪問(wèn)量正序 4訪問(wèn)量倒序
文章(zhāng)增加訪問(wèn)量 [[${cms.addView(content.id)}]]
上/下一條 order:1上一條 2下一條 <div th:each="a : ${cms.getContent('id:'+content.id+',order:1')}" th:onclick="location.href='[(${a.url})]'">[[${a.title}]]
分(fēn)頁示例:
<th:block th:with="p=${cms.getContentPage('channelId:' + channel.channelId + ',siteId:'+site.id+',pageNo:'+page+',count:10,order:2')}"> <div class="news-list"> <div class="news-item" th:each="no: ${p.rows}"> <div class="news-cover" th:onclick="location.href='[(${no.url})]'"> <img th:src="${no.cover}!=null?${no.cover}:${ctx}+'/img/index/cover-img.jpg'" /> </div> <div class="news-details"> <span th:onclick="location.href='[(${no.url})]'">[[${no.title}]]</span> <a> <span>[[${#dates.format(no.releaseTime, 'yyyy-MM-dd')}]]</span> <span class="views"><img th:src="${ctx}+'/img/index/eye.svg'" /><span>[[${no.views}]]</span></span> </a> </div> </div> </div> <th:block th:include="${res}+'/includes/page'" /> </th:block>