Skip to content

Latest commit

 

History

History
54 lines (42 loc) · 1.19 KB

README.md

File metadata and controls

54 lines (42 loc) · 1.19 KB

Multi Url Picker for Umbraco 7

Allows editors to pick and sort multiple urls, it uses Umbraco's link picker which supports internal and external links and media.

Installation

v1.0.0 only works with Umbraco 7.1.2 and newer.

Install the package from the Umbraco package repository.

or

Install the NuGet package.

Usage

Create a new Data Type and select the "Multi Url Picker" property editor.

Typed

Add a reference to RJP.MultiUrlPicker.dll in your project

@{
  var multiUrlPicker = Model.Content.GetPropertyValue<MultiUrls>("multiUrlPicker");
  if (multiUrlPicker.Any())
  {
    <ul>
      @foreach (var item in multiUrlPicker)
      {
        <li><a href="@item.Url" target="@item.Target">@item.Name</a></li>
      }
    </ul>
  }
}

Dynamic

@{
  var multiUrlPickerDyn = CurrentPage.multiUrlPicker;
  if (multiUrlPickerDyn.Any())
  {
    <ul>
      @foreach (var item in multiUrlPickerDyn)
      {
        <li><a href="@item.Url" target="@item.Target">@item.Name</a></li>
      }
    </ul>
  }
}

Changelog

See the changelog here