2013-01-14 14:04:33 -01:00
|
|
|
@inherits umbraco.MacroEngines.DynamicNodeContext
|
|
|
|
|
|
|
|
|
|
@*
|
|
|
|
|
Macro to list nodes from a Multinode tree picker, using the pickers default settings.
|
|
|
|
|
Content Values stored as xml.
|
|
|
|
|
|
|
|
|
|
To get it working with any site's data structure, simply set the selection equal to the property which has the
|
|
|
|
|
multinode treepicker.
|
|
|
|
|
*@
|
|
|
|
|
|
|
|
|
|
@{
|
|
|
|
|
var selection = Model.PropertyWithPicker;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@* Lists each selected value from the picker as a link *@
|
|
|
|
|
<ul>
|
2014-01-16 19:49:57 +01:00
|
|
|
@foreach(var id in selection.Split(',')){
|
2013-01-14 14:04:33 -01:00
|
|
|
|
|
|
|
|
@*For each link, get the node, and display its name and url*@
|
2014-01-16 19:49:57 +01:00
|
|
|
var node = Library.NodeById(id);
|
2013-01-14 14:04:33 -01:00
|
|
|
|
|
|
|
|
<li><a href="@node.Url">@node.Name</a></li>
|
|
|
|
|
}
|
|
|
|
|
</ul>
|