Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey guys, could any one point out any advice or any help with my code to convert the first level of my site in groups of 3?
@inherits umbraco.MacroEngines.DynamicNodeContext@helper traverse(dynamic node) { var maxLevelForSitemap = String.IsNullOrEmpty(Parameter.MaxLevelForSitemap) ? 4 : int.Parse(Parameter.MaxLevelForSitemap); var values = new Dictionary<string, object>(); values.Add("maxLevelForSitemap", maxLevelForSitemap); var items = node.Children.Where("Visible").Where("Level <= maxLevelForSitemap", values); if (items.Count() > 0) { var root = Model.AncestorOrSelf(1); var className = "level" + @node.Level; <ul class="@className"> @foreach (var item in items) { <li> <a href="@item.Url">@item.Name</a> @traverse(item) </li> } </ul> }}<div class="sitemap"> @traverse(@Model.AncestorOrSelf())</div>
Any ideas?
I have tried making if statements if node.level == 1 then make it into groups, but didnt work at all.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Making Sitemap Levels in groups of?
Hey guys, could any one point out any advice or any help with my code to convert the first level of my site in groups of 3?
Any ideas?
I have tried making if statements if node.level == 1 then make it into groups, but didnt work at all.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.