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
I have a page with the current websites footer navigation. I need to show both navigation footers on one page.
can I hardcode the top level of where this other umbraco domain in my current code then add both macros in master.
here is the code. thank you
@inherits umbraco.MacroEngines.
DynamicNodeContext
@helper traverse(
node)
{
maxLevelForSitemap = 3;
>();
values.Add(
, maxLevelForSitemap);
);
="footerNav">
@
items)
;
>
).Count() > 0)
children)
grandChildren)
}
@*
*@
@traverse(@Model.AncestorOrSelf())
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
How can I show 2 footer navigations on one page from 2 different domains
I have a page with the current websites footer navigation. I need to show both navigation footers on one page.
can I hardcode the top level of where this other umbraco domain in my current code then add both macros in master.
here is the code. thank you
@inherits umbraco.MacroEngines.
DynamicNodeContext
@helper traverse(
dynamicnode)
{
varmaxLevelForSitemap = 3;
var values = new Dictionary<string, object>();
values.Add(
"maxLevelForSitemap", maxLevelForSitemap);
var items = node.Children.Where("ShowInTopHeaderNav");
<ul class="footerNav">
@
foreach (var item initems)
{
var selected = Array.IndexOf(Model.Path.Split(','), item.Id.ToString()) >= 0 ? " class=\"active\"" : "";
<li><a@Html.Raw(selected) href="@item.Url">@item.Name ></a>
@
if (item.Children.Where("ShowInTopHeaderNav").Count() > 0)
{
var children = @item.Children.Where("ShowInTopHeaderNav");
<ul>
@
foreach (var child inchildren)
{
var selectedSub = Array.IndexOf(Model.Path.Split(','), child.Id.ToString()) >= 0 ? " class=\"activeSub\"" : "";
<li><a@Html.Raw(selectedSub) href="@child.Url">@child.Name</a>
@
if (child.Children.Where("ShowInTopHeaderNav").Count() > 0)
{
var grandChildren = @child.Children.Where("ShowInTopHeaderNav");
<ul>
@
foreach (var grandChild ingrandChildren)
{
<li><a href="@child.Url">@grandChild.Name</a> var grandChildren = @grandChild.Children.Where("ShowInTopHeaderNav");
</li>
}
</ul>
}
</li>
}
</ul>
}
@*
@traverse(item)*@
</li>
}
</ul>
}
@traverse(@Model.AncestorOrSelf())
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.