but i like til to list all child pages of its ancestor and not from a changeable source.
i am gona use it to liat all item in a category
I hope som can help me.
This is my macro
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
=== Macro Parameters To Create ===
Show:True 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())
{
@foreach (var page in startNode.Children.Where("Visible"))
{
Macro that list all from ancestor
Hey i have this macro that works great.
but i like til to list all child pages of its ancestor and not from a changeable source.
i am gona use it to liat all item in a category
I hope som can help me.
This is my macro
@foreach (var page in startNode.Children.Where("Visible")) {- @page.Name
}
} }is working on a reply...