25 lines
755 B
Plaintext
25 lines
755 B
Plaintext
@using Umbraco.Core.Models
|
|
@using Umbraco.Web
|
|
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
|
|
|
@*
|
|
This snippet lists the items from a Multinode tree picker, using the picker's default settings.
|
|
Content Values stored as XML.
|
|
|
|
To get it working with any site's data structure, set the selection equal to the property which has the
|
|
multinode treepicker (so: replace "PropertyWithPicker" with the alias of your property).
|
|
*@
|
|
|
|
@{ var selection = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("PropertyWithPicker").ToArray(); }
|
|
|
|
@if (selection.Length > 0)
|
|
{
|
|
<ul>
|
|
@foreach (var item in selection)
|
|
{
|
|
<li>
|
|
<a href="@item.Url">@item.Name</a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
} |