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

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