Embed a Table of Attachment into Page Content

Hi Guys,

I want to integrate a table of the attachments that are uploaded to a page into the content.
Basically like the “attachments” tab at the bottom of each page.

Practically I want to upload weekly reports as PDFs to a Page and list them as a presentable table with date, author etc.

Does anyone had the same challenge?

Maybe an Velocity Script?

Thanks.

First idea that comes to mind is https://extensions.xwiki.org/xwiki/bin/view/Extension/Attachments%20Macro but I haven’t tried it and idk if it works well or not.

I’m not sure I see the need though since there’s the attachment tab already. Is it because you’d like to customize the columns of the attachment tab table?

Is it because you want to export to PDF and have that table exported?

Thanks

1 Like

Hi,

thank you for your quick response. Don’t know why I haved found this macro yet. :face_with_peeking_eye:
Thats what I searched for.

Is it because you’d like to customize the columns of the attachment tab table?

Yes. It would be great if it could be customized a bit. But I dont know how.

  • E.g. to display only PDF or JPG if there are different types of files.
  • Or define which colums are displayed.
  • Or get rid of the button within the macro, that allows to upload new attachments.
  • Or define that only Attachments will be shown which begin with “new_”

Is it because you want to export to PDF and have that table exported?

I wanted to display attachments inline of content. So you dont have to scroll all the way down and switch the tabs.