Attachments

Brent Theunckens asked on April 4, 2016 10:31

Hello,

I'm trying to create a dashboard with different attachments in folders.

Image Text

How can I display the attachments from different folders on my page? When I insert two attachements web parts it gives me this result:

Image Text

Correct Answer

David te Kloese answered on April 4, 2016 12:54

Hi,

The Attachments webpart Displays a list of ALL CMS.File documents that are located under the document containing the web part in the content tree.

Probably best to use a basic Repeater (in Kentico 9 it is already a basic Kentico CMS Repeater).

Here you can set the Path property: /Support/% and page type CMS.File

In the Transformation use something like

<a target="_blank" href="<%# GetFileUrl("FileAttachment") %>">
<%# IfImage("FileAttachment", GetImage("FileAttachment", 400, 400, 400, Eval("FileDescription")), "")%>
<br /><%# Eval("FileName",true) %></a>

to show the attachments under this document.

Greets,

David

2 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on April 4, 2016 11:44

Hi,

What Web Part did you use to display these "attachments"? (Looking at your screen it looks like you created sub pages of type 'File'.

If you used 2 repeaters to show the lists you could limit it by using the Path setting: Image Text

Kind regards,

David

2 votesVote for this answer Mark as a Correct answer

Brent Theunckens answered on April 4, 2016 12:26

Hi,

I'm using the attachments Web Part to display the documents. The documents you see at the first image are just files(New -> File).

Kind regards, Brent

0 votesVote for this answer Mark as a Correct answer

Brent Theunckens answered on April 4, 2016 13:24

Hello,

Thanks a lot it is working now.

Kind regrets, Brent

0 votesVote for this answer Mark as a Correct answer

Compos Jones answered on July 17, 2018 14:13

Acrobat products allow you to open and save attachments to PDF files. However, attachments represent a potential security risk because they can contain malicious content, open other dangerous files, or launch applications. Certainly file types such as .bin, .exe, .bat, and so on will be recognized as threats by most users and are not allowed as attachments. Adobe applications maintain attachment black and white lists that can be modified and locked by the administrator. Tell The Bell

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.