Copied to clipboard

Flag this post as spam?

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


  • Sam 47 posts 153 karma points
    Nov 20, 2012 @ 07:33
    Sam
    0

    Default Navigation Macro Doesn't Work in 4.10.1

    Was trying to make a top nav that included the children of my home page. Couldn't get it to work, so I dropped in the pre-build Navigation Macro and it still shows "Error loading Razor Script".

    To make sure it wasn't an issue with CSHTML Macros in general, I dumped in the Breadcrumb and List Sub Pages By Date And Limit and both of those functioned properly.

    More on my problem at StackOverflow

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 20, 2012 @ 08:16
    Fuji Kusaka
    0

    Hi Sam,

    Can you try something like 

    <umbraco:Macro  runat="server" language="cshtml">
    @inherits umbraco.MacroEngines.DynamicNodeContext
    @{
    <ul>
        @foreach (var item in Model.AncestorOrSelf(1).Descendants("docTypeName"))
        {
            <li><a href="@item.Url">@item.Name</a></li>
        }
    </ul>

    </umbraco:Macro>
  • 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.

Please Sign in or register to post replies