freemarker 分页取值

Posted 1582277142

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了freemarker 分页取值相关的知识,希望对你有一定的参考价值。

<#if pagination??&&pagination.list??>
<#list pagination.list as video>
<td align="center">${video.videoId}</td>
<#assign layMenu = video.videoExts>
<#list layMenu as videoExt>
<td align="center"> ${(videoExt.title)?default("")}</td>

<#if (videoExt.origin ==1)> <td align="center">哔哩哔哩</td> </#if>
<#if (videoExt.origin ==2)> <td align="center">腾讯</td> </#if>
<#if (videoExt.origin ==3)> <td align="center">风行</td> </#if>
<#if (videoExt.origin ==4)> <td align="center">搜狐</td> </#if>
<#if (videoExt.origin ==5)> <td align="center">土豆</td> </#if>
<#if (videoExt.origin ==6)> <td align="center">优酷</td> </#if>
<#if (videoExt.origin ==7)> <td align="center">新浪</td> </#if>
<#if (videoExt.origin ==8)> <td align="center">爱奇艺</td> </#if>

<td align="center">${(videoExt.description)?default("")}</td>
<td align="center"> ${(videoExt.duration)?default("")}</td>

<#if (videoExt.classification ==1)> <td align="center">搞笑</td> </#if>
<#if (videoExt.classification ==2)> <td align="center">美食</td> </#if>
<#if (videoExt.classification ==3)> <td align="center">动物圈</td> </#if>
<#if (videoExt.classification ==4)> <td align="center">运动</td> </#if>
<#if (videoExt.classification ==5)> <td align="center">鬼畜调教</td> </#if>
<#if (videoExt.classification ==6)> <td align="center">美妆</td> </#if>
<#if (videoExt.classification ==7)> <td align="center">服饰</td> </#if>
<#if (videoExt.classification ==8)> <td align="center">健身</td> </#if>
<#if (videoExt.classification ==9)> <td align="center">资讯</td> </#if>
<#if (videoExt.classification ==10)> <td align="center">明星</td> </#if>
<#if (videoExt.classification ==11)> <td align="center">Korea相关</td> </#if>
<#if (videoExt.classification ==12)> <td align="center">电影相关</td> </#if>
<#if (videoExt.classification ==13)> <td align="center">电视剧相关</td> </#if>

<td align="center"> ${(videoExt.crawlTime)?default("")}</td>

<#if videoExt.similarRate?exists>
<#if (videoExt.similarRate >=0.8)> <td align="center" bgcolor="e91e6f"; > ${(videoExt.similarRate)?default("")}</td> </#if>
<#if (videoExt.similarRate < 0.8)> <td align="center"> ${(videoExt.similarRate)?default("")}</td> </#if>
<#else>
<td align="center"> </td>
</#if>

<td align="center">
<a href="#" onclick="showWindow(‘${(videoExt.sourceUrl)?default(‘‘)}‘);" class="pn-opt">预览</a>&nbsp;
<a href="#" onclick="showCover(${video.videoId});" class="pn-opt">审核</a>
</td>
</#list>
<!--
<a href="v_edit.do?id=571482&cid=&pageNo=&queryTitle=&queryInputUsername=&queryTopLevel=false&queryRecommend=false&queryTypeId=&queryStatus=&queryOrderBy=0" class="pn-opt">修改</a> -->
<!--
<a href="o_delete.do?ids=571482&cid=&pageNo=&queryTitle=&queryInputUsername=&queryTopLevel=false&queryRecommend=false&queryTypeId=&queryStatus=&queryOrderBy=0" onclick="if(!confirm(‘您确定删除吗?‘)) {return false;}" class="pn-opt">删除</a>
-->
</td>
</tr>
</#list>
</#if>

以上是关于freemarker 分页取值的主要内容,如果未能解决你的问题,请参考以下文章

FreeMarker分页组件监听器

freemarker${}包含${}

freeMark的Map取值问题

FreeMarker分页模版的使用

FreeMarker 分页模版

关于FreeMarker的list循环取值问题