Multi-URL Picker

Basically, the user can create and edit multiple instances of a URL Picker. See the URL Picker documentation page for an understanding of the URL Picker's usage.

User Facing

  • Editing
List 1.PNG
  • Drag to sort
Drag-Sort.PNG

Settings

Same as URL Picker.

Developer Facing

Returns either an empty list, or a list of URL Picker items (which may or may not have an empty URL field).

The data can be saved in CSV, XML or JSON format, the three looking like this respectively:

URL,True,,http://our.umbraco.org,
Content,False,1047,/homeorawaytest2.aspx,
Media,False,1082,/media/179/bolero.mid,Listen to this!
Upload,False,,/media/273/slide_temp.jpg,
(for CSV, the headers are the same as with the single URL Picker, and each URL Picker item is one line).

<multi-url-picker>
    <url-picker mode="URL">
        <new-window>True</new-window>
        <node-id />
        <url>http://our.umbraco.org</url>
        <link-title />
    </url-picker>
    <url-picker mode="Content">
        <new-window>False</new-window>
        <node-id>1047</node-id>
        <url>/homeorawaytest2.aspx</url>
        <link-title />
    </url-picker>
    <url-picker mode="Media">
        <new-window>False</new-window>
        <node-id>1082</node-id>
        <url>/media/179/bolero.mid</url>
        <link-title>Listen to this!</link-title>
    </url-picker>
    <url-picker mode="Upload">
        <new-window>False</new-window>
        <node-id />
        <url>/media/273/slide_temp.jpg</url>
        <link-title />
    </url-picker>
</multi-url-picker>

{
    "Items":[
        {
            "Title":null,
            "Mode":1,
            "NodeId":null,
            "Url":"http://our.umbraco.org",
            "NewWindow":false
        },
        {
            "Title":null,
            "Mode":2,
            "NodeId":1047,
            "Url":"/homeorawaytest2.aspx",
            "NewWindow":false
        },
        {
            "Title":"Listen to this!",
            "Mode":3,
            "NodeId":1082,
            "Url":"/media/179/bolero.mid",
            "NewWindow":false
        },
        {
            "Title":null,
            "Mode":4,
            "NodeId":null,
            "Url":"/media/273/slide_temp.jpg",
            "NewWindow":false
        }
    ]
}

If the Multi-URL Picker is to be used in a .NET control, you can deserialize any of the above data strings to a strongly typed object - using the static method uComponents.Core.DataTypes.MultiUrlPicker.Dto.MultiUrlPickerState.Deserialize.

Last edited Oct 4, 2011 at 6:02 PM by diachedelic, version 19

Comments

dconlisk Apr 17 at 1:35 PM 
The Deserialize method seems to live in a different namespace now: uComponents.DataTypes.MultiUrlPicker.Dto.MultiUrlPickerState.Deserialize (not uComponents.Core.etc.etc)

arungahlot Oct 25, 2012 at 4:19 AM 
Is there a way where I can specify the upload filesize limit (I think we can increase the overall filesize of upload using the umbraco configuration file) for the upload tab of the url picker / multi-url picker it doesn't seem to be there in the settings tab of the data type.

JohnCScott Sep 24, 2012 at 11:07 AM 
there is a very useful helper here for processing this as XSLT https://github.com/leekelleher/ucomponents-xslt/blob/master/uComponents.XsltTemplates/urlpicker-helper.xslt that will take all the variants and make a nice formatted output for you that's easy to update, and some great articles at http://pimpmyxslt.com/articles/match-templates-intro/ to explain what you find here a little more...

caninobd Feb 1, 2012 at 9:55 PM 
What would truly be great is if you could also add a date field along with the title, This is something that is asked for a lot. This way you can display documents order by and display a date with it.

samandmoore Jan 12, 2012 at 7:17 PM 
I can't seem to edit this documentation page, so here is a bit more robust example of accessing the items using the deserialize method:

MultiUrlPickerState items = MultiUrlPickerState.Deserialize("something");
foreach (UrlPickerState item in items.Items)
{
string.Format("{0} : {1}", item.NodeId, item.Title);
}

paddywhack Mar 22, 2011 at 1:47 AM 
Hey looks great.

Is there a way to set the min/max number of URLs a client/user can create, similar to how you can in the Multi Tree Node Picker? e.g. a maximum of 4 links.