Multi Url Picker

Schema Alias: Umbraco.MultiUrlPicker

UI Alias: Umb.PropertyEditorUi.MultiUrlPicker

Returns: IEnumerable<Link> or Link

Multi URL Picker allows editors to select and sort multiple URLs. The property returns either a single item or a collection, depending on the Maximum number of items setting in the Data Type configuration.

  • When the maximum is set to 1, it returns a single item.

  • When the maximum is greater than 1, it returns a collection.

The URLs can point to internal, external, or media items.

Data Type Definition Example

Multi Url Picker Data Type Definition

Content Example

Multi Url Picker Content

MVC View Example

Without Models Builder

This example handles the case of Maximum number of items set to 1:

With Models Builder

And here is the case of Maximum number of items set to 1:

Getting Absolute URLs

By default, link.Url returns a relative URL for internal content links (for example, /products/, /blog/, and so on). If you need absolute URLs, for example in emails, sitemaps, or cross-domain scenarios, you can use IPublishedUrlProvider with UrlMode.Absolute.

Inject IPublishedUrlProvider at the top of your view and resolve internal links using UrlMode.Absolute. External and media links are already stored as absolute strings and pass through unchanged.

When setting values programmatically, you can pass UrlMode.Absolute when building Link objects in code:

Add values programmatically

See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Servicearrow-up-right.

circle-info

The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.

If Models Builder is enabled you can get the alias of the desired property without using a magic string:

Last updated

Was this helpful?