can i pass one fields(attachments) in my PageType as Datasource to cmsRepeater

kumar GANJI asked on November 26, 2020 16:23


I have Page type add to my Site. I have created a page template to it.In my page template I have a repeater and my page they has a Add Attachments Field now I want to display this attachments in my repeater(or any other webpart i can use).

Recent Answers

Juraj Ondrus answered on November 27, 2020 07:00

You need to write a transformation and use one of the methods which work with the attachments. Sample transformation from the sample corporate site:

  1. text transformation macro: {% GetImage(NewsTeaser, title, 90, 0, 0)%} where NewsTeaser is the attachment field
  2. ASCX transformation sample, different one: <%# GetAttachmentIcon("AttachmentGUID") %><a target="_blank" href="<%# GetAbsoluteUrl(GetAttachmentUrl(Eval("AttachmentName"), Eval("NodeAliasPath")), EvalInteger("AttachmentSiteID")) %>"><%# Eval("AttachmentName",true) %>

Just to list different methods...

0 votesVote for this answer Mark as a Correct answer

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