Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
You can make a block for that and insert it in the text editor (XhtmlString property).
Just one property needed on the block type:
[ContentType] public class FileListBlock : BlockData { [UIHint(UIHint.MediaFolder)] public virtual ContentReference FolderPath { get; set; } }
Then you can use IContentRepository to get the children (files):
var contentRepo = ServiceLocator.Current.GetInstance<IContentRepository>(); IEnumerable<MediaData> files = contentRepo.GetChildren<MediaData>(myBlockContent.FolderPath);
In your block view you just render <ul> with links to the files:
<ul> @foreach (var file in files) { <li><a href="@Url.ContentUrl(file.ContentLink)">@file.Name</a> } </ul>
I am rather new at episerver started now on the 7.5!
I want editors to easy choose files from a mapp and make link of them
In ver 6 there looks like there is something called dynamic content and file list!
See it in this video
http://www.screenr.com/aKa8
Thats the easy solution I want! Is that solution avaible in 7.5?
I cannot find it!
// Markus