26 lines
607 B
Plaintext
26 lines
607 B
Plaintext
@inherits umbraco.MacroEngines.DynamicNodeContext
|
|
@*
|
|
=== Macro Parameters To Create ===
|
|
Alias:nodeId Name:Node ID Type:Content Picker
|
|
*@
|
|
|
|
|
|
@{
|
|
var startNodeID = Parameter.nodeId;
|
|
}
|
|
|
|
@if (startNodeID != null)
|
|
{
|
|
@* Get the start node as a dynamic node *@
|
|
var startNode = Library.NodeById(startNodeID);
|
|
|
|
if (startNode.Children.Where("Visible").Any())
|
|
{
|
|
<ul>
|
|
@foreach (var page in startNode.Children.Where("Visible"))
|
|
{
|
|
<li><a href="@page.Url">@page.Name</a></li>
|
|
}
|
|
</ul>
|
|
}
|
|
} |