We want to modify the attachments macro. There is the column "modified" in that macro that shows who and when the attachment was modified and we do not want this to be included in our table. We want a basic table that shows only the file names and users can download those files easily. Please let us know if there is any way to modify this macro.
You cannot modify this macro, but you can create your own "user macro" with the same functions.
Create new User Macro:
Put macro source like this:
## @noparams
#set ($attachmentsList = $content.getLatestVersionsOfAttachments())
#if ($attachmentsList.size() > 0)
<ul>
#foreach( $attachment in $attachmentsList )
#set ($currentAttachmentId = $attachment.id)
#if ($attachment.comment && $attachment.comment.trim().length() > 0)
<li><a href="$generalUtil.htmlEncode("${req.contextPath}${attachment.downloadPathWithoutVersion}")">$generalUtil.htmlEncode($attachment.comment)</a></li>
#else
<li><a href="$generalUtil.htmlEncode("${req.contextPath}${attachment.downloadPathWithoutVersion}")">$generalUtil.htmlEncode($attachment.fileName)</a></li>
#end
#end
</ul>
#end
Thank you very much Gregor! This is exactly what I was looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It would require re-coding and re-compiling the add-on that provides the macro to do this.
You could probably get close with a user macro though, instead of coding a new add-on
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.