Hi All,
Its been about 3 years since I've worked on a full blown Umbraco project and I'm a bit rusty with my razor syntax.
I've taken the standard List nodes from changeable resource.
@if (Model.MacroParameters["startNodeId"] != null)
{
@* Get the start node as a dynamic node *@
var startNode = Umbraco.Content(Model.MacroParameters["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>
}
}
Of which it will always return 6 items but I want to split these onto two rows of 3 like so
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<ul>
<li>Item 4</li>
<li>Item 5</li>
<li>Item 6</li>
</ul>
But cant for the live of me remeber how to do it.:(
Thanks in advance.
Tom
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/49775-getting-children-results-and-splitting-into-rows-of-3