Update Umbraco to 7.12.2
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
@using Umbraco.Core.Models
|
||||
@using Umbraco.Web
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
|
||||
@*
|
||||
This snippet lists the items from a Multinode tree picker, using the pickers default settings.
|
||||
Content Values stored as xml.
|
||||
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 = CurrentPage.PropertyWithPicker.Split(','); }
|
||||
@{ var selection = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("PropertyWithPicker").ToArray(); }
|
||||
|
||||
<ul>
|
||||
@foreach (var id in selection)
|
||||
{
|
||||
var item = Umbraco.Content(id);
|
||||
<li>
|
||||
<a href="@item.Url">@item.Name</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
@if (selection.Length > 0)
|
||||
{
|
||||
<ul>
|
||||
@foreach (var item in selection)
|
||||
{
|
||||
<li>
|
||||
<a href="@item.Url">@item.Name</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
Reference in New Issue
Block a user