Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I need to enable multiple document links on a doctype. For uploading a document, I'm using the Digibiz Advanced Media Picker.
Up until now, I only enabled selecting one document file with DAMP, but not I need te enable selecting multiple document files and listing those documents on a page.
Does anyone know where I can find example code for iterating over multiple documents of type DAMP?
Thanks for your help,
Try the DAMP samples project: http://www.screenr.com/gz0s
It shows how to iterative over multiple media items. It doesn't matter if it's an image or not because they all have the url (umbracoFile) property.
The DAMP Gallery and Hybrid Framework show how to do this with newer techniques.
Through some trial and error I got it working like this:
var documents = @Model.activityDownload;
@foreach (dynamic document in documents)
var file = document.ActivityDocument;
var filename = Path.GetFileName(file.InnerText);
The version of my Umbraco install is 4.9.0 and the DAMP version is 2.0, so I guess I'm not able to use the Hybrid Framework.
The Hybrid Framework is more to begin new websites with. If you're using 4.9 with DAMP 2.0 your example is the best solution.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted