Forum Discussion
vishwajit_shind
10 years agoExpert
Hi Yossis,
You need to create custom component to display attachment if user is registered user. Please follow the below code which can be inserted into the forum message quilt:-
<#assign AttachedFile = rest("/messages/id/${env.context.message.id}/uploads/attachments").attachments.attachment />
<#list AttachedFile as file>
<#if !user.anonymous>
<a class="lia-link-navigation attachment-link" href="${file.url}">${file.title} ‏${(file.content.size?number/1024)?round} KB</a>
<#else>
<a class="lia-link-navigation attachment-link" href="/t5/user/userloginpage">${file.title} ‏${(file.content.size?number/1024)?round} KB</a>
</#if>
</#list>
Regards,
Vishwajit Shinde.
Related Content
- 12 years ago