主题 : 请问怎么在渲染新闻列表时获取到新闻里的附件下载地址?
级别: 白丁
UID: 25929
积分:365 加为好友
威望: 6 精华: 0
主题:43 回复:285
注册时间:2011-11-19
在线时长:0
1#   发表于:2022-01-26 17:55:22  IP:222.136.*.*
[@cms_content_page  channelPath='bianmfw' orderBy='29' isTop='0'  count='10' pageNo='0']
 
                        [#list tag_pagination.content as a]
                        <tr>
                            <td>
                                <a href="${a.url}"> <p>${a.title}</p></a>
                            </td>
                            <td>${a.author!}</td>
                            <td>${a.releaseTime}</td>
                            <td>
                                <a href="${a.url}">
                                    <img src="${res}/static/img/readNumImg.png" alt="" width="16" height="16">
                                    <span>
                                        ${a.views}
                                    </span>
                                </a>
                            </td>
                            <td>
                                <a href="#">
                                    <img src="${res}/static/img/downNumImg.png" alt="" width="16" height="16">
                                    <span>
                                        ${a.downloads}
                                    </span>
                                </a>

                            </td>
                        </tr>
                        [/#list]
                        [#include "../includes/page.html"/]
                        [/@cms_content_page]
生生筝鸣
级别: 总版主
UID: 10736
积分:149787 加为好友
威望: 212 精华: 42
主题:297 回复:127674
注册时间:2010-09-08
在线时长:90.1
2#   发表于:2022-01-27 08:47:07  IP:59.211.*.*
内容详情页里面附件列表获取:

 [@cms_content id=content.id]
                              <ol style="list-style-type:decimal;font-size:12px;line-height:200%;">
                                <li style="border-bottom:1px dashed #dedede;margin-bottom:10px;line-height:30px;">附件列表:</li>

 [#if tag_bean.attr.attachments??&&tag_bean.attr.attachments.contentAttrRes??&&(tag_bean.attr.attachments.contentAttrRes)?size>0]
                              [#list tag_bean.attr.attachments.contentAttrRes as res]
                                <li style="list-style-type:decimal;"><a href="${res.resUrl!}">【${res.resAlias!}】</a> <span style="display:inline-block;float:right;margin-left:50px;">大小:${res.fileSize!}</span></li>
                                  [/#list]
                               </ol>[/#if]
                             [/@cms_content]
路漫漫其修远兮,吾将上下而求索!
1 共1页