Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • GI 4 posts 24 karma points
    Aug 20, 2012 @ 21:56
    GI
    0

    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(

     

     

    dynamic

    node)

    {

     

    var

    maxLevelForSitemap = 3;

     

    var values = new Dictionary<string, object

    >();

    values.Add(

     

     

    "maxLevelForSitemap"

    , maxLevelForSitemap);

     

    var items = node.Children.Where("ShowInTopHeaderNav"

    );

     

    <ul class

    ="footerNav">

    @

     

     

    foreach (var item in

    items)

    {

     

    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 in

    children)

    {

     

    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 in

    grandChildren)

    {

     

    <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())

Please Sign in or register to post replies

Write your reply to:

Draft