I have the follwoing in my media section where i can have multiple file upload of different type and making use of Ucomponents Multiple url picker "Upload" .
So far its working but having some issues when i have to display the Name and Url to the file.
@if(m.ChildCount > 0 ){ foreach(var addFile in m.GetChildMedia().Where(x=>x.getProperty("tMaterials").Value.ToString() !="")){ string s = @addFile.getProperty("tMaterials").Value.ToString(); foreach(var files in s){ @files }
@foreach(var link inm.muli-url-picker.urlpicker){ //do stuff based on link mode @if(link.mode.ToLower()=="upload"){ @link.GetProperty("Blah").Value; }
}
its gotta be something like that, sorry am doing DotNetNuke and its messing my brain.. II don't think the Media type makes much differwence. once you get the right reference
Multiple Url Picker "Upload"
I have the follwoing in my media section where i can have multiple file upload of different type and making use of Ucomponents Multiple url picker "Upload" .
So far its working but having some issues when i have to display the Name and Url to the file.
This is my output.
<multi-url-picker> <url-picker mode="Upload"> <new-window>False</new-window> <node-id></node-id> <url>/media/2768/Doc 2.xlsx</url> <link-title>Testing</link-title> </url-picker> <url-picker mode="Upload"> <new-window>False</new-window> <node-id></node-id> <url>/media/2768/Agreement for Sale.doc</url> <link-title>asdasdasd</link-title> </url-picker> <url-picker mode="Upload"> <new-window>False</new-window> <node-id></node-id> <url>/media/2768/Events Calendar 2013_v1.xlsx</url> <link-title></link-title> </url-picker> <url-picker mode="Upload"> <new-window>False</new-window> <node-id></node-id> <url>/media/2768/Doc 5.pdf</url> <link-title></link-title> </url-picker> </multi-url-picker>
Any help on this
//Fuji
Is it looping and counting through the right number of items?
Hey Ravi,
Yes getting the right items but like this
<multi-url-picker> <url-picker mode="Upload"> <new-window>False</new-window> <node-id></node-id> <url>/media/2768/Doc 2.xlsx</url> <link-title>Testing</link-title> </url-picker> <url-picker mode="Upload"> <new-window>False</new-window> <node-id></node-id> <url>/media/2768/Agreement for Sale.doc</url> <link-title>asdasdasd</link-title> </url-picker> <url-picker mode="Upload"> <new-window>False</new-window> <node-id></node-id> <url>/media/2768/Events Calendar 2013_v1.xlsx</url> <link-title></link-title> </url-picker> <url-picker mode="Upload"> <new-window>False</new-window> <node-id></node-id> <url>/media/2768/Doc 5.pdf</url> <link-title></link-title> </url-picker> </multi-url-picker>
so you want to display the values in the XML eg link title and url or are you trying to get another value from somewhere??
Cos there is a bunch of help and pointers here
http://our.umbraco.org/forum/developers/razor/23666-Razor-script-to-iterate-through-uComponents-multi-URL-picker-nodes?p=1
Try those but without success! :(
Yes i want to display the values in XML.
By the way am using the Multiple UrlPicker in Media Section
its gotta be something like that, sorry am doing DotNetNuke and its messing my brain.. II don't think the Media type makes much differwence. once you get the right reference
Sorry still nothing! :(
umbraco.cms.businesslogic.media.Media' does not contain a definition for 'multi' and no extension method 'multi' accepting a first argument of type
it might be m.urlpicker I can see it but my brain is all clouded..and verbalising it is even harder
is working on a reply...