Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 14, 2013 @ 09:55
    Fuji Kusaka
    0

    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.

    @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
                                           }                                                                                       
                                                                                       
                                    }                                                                               
     }

    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

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Nov 14, 2013 @ 12:26
    Ravi Motha
    0

    Is it looping and counting through the right number of items?

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 14, 2013 @ 12:29
    Fuji Kusaka
    0

    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>

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Nov 14, 2013 @ 12:35
    Ravi Motha
    0

    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

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 14, 2013 @ 12:51
    Fuji Kusaka
    0

    Try those but without success! :(

    Yes i want to display the values in XML.

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 14, 2013 @ 13:00
    Fuji Kusaka
    0

    By the way am using the Multiple UrlPicker in Media Section

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Nov 14, 2013 @ 13:03
    Ravi Motha
    0
            @foreach (var link in m.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

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 14, 2013 @ 13:20
    Fuji Kusaka
    0

    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

    foreach(var link in m.multi-url-picker.urlpicker){}                 
  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Nov 14, 2013 @ 13:22
    Ravi Motha
    0

    it might be m.urlpicker I can see it but my brain is all clouded..and verbalising it is even harder

Please Sign in or register to post replies

Write your reply to:

Draft