Copied to clipboard

Flag this post as spam?

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


  • bob baty-barr 1180 posts 1294 karma points MVP
    Aug 03, 2012 @ 15:49
    bob baty-barr
    0

    Error loading MacroEngine script

    Getting several load errors on a clean install on v4.7.2 - any thoughts?

  • Jorge Lusar 150 posts 489 karma points
    Aug 03, 2012 @ 15:52
    Jorge Lusar
    0

    Hi Bob,

    The uBootstrap version v1.1.0 is only compatible with Umbraco 4.8.0.

    Thanks,

    Jorge

  • bob baty-barr 1180 posts 1294 karma points MVP
    Aug 03, 2012 @ 15:53
    bob baty-barr
    0

    and that would explain it! thanks Jorge! i will install 4.8 and give it a whirl!

  • Jorge Lusar 150 posts 489 karma points
    Aug 03, 2012 @ 16:04
    Jorge Lusar
    0

    You're welcome! Please be aware that after releasing the package, I ran the MiniProfiler for Umbraco and I discovered some performance issues which I explain here http://jlusar.es/profiling-ubootstrap. If you want to get the 'fast' razor views, you can grab it from Github. I'm planning to release a new package in about a month with the enhanced razor views and Twitter Bootstrap 2.1 if available.

    Cheers,

    J

  • fabrice 104 posts 227 karma points
    Aug 15, 2012 @ 09:58
    fabrice
    1

    Hello Jorge,

    Thanks for the "fast" razor view (and the miniprofiler !! it's great)

    Just for info, here is the way I would write the Navigation.cshtm. I use DynamicNode (not dynamic ;) and GetChildrenAsList.Items.Where(xxx)

    In this case I don't have to get all children as an Array and do a filter afterwards.

    Of course I use GetChildrenAsList if I only need the first level children, otherwise I use GetDescendant

    PS : I didn't notice any performance improvement with my code throught...

    @using umbraco.MacroEngines
    @inherits umbraco.MacroEngines.DynamicNodeContext
    @{
        DynamicNode root = Model.AncestorOrSelf("Homepage");
       
       
        <ul class="nav">
        @{ var homeSelected = @Model.Level == 1 ? " class=\"active\"" : string.Empty; }
            <[email protected](homeSelected)><a href="@root.Url">@root.Name</a></li>

        @foreach (DynamicNode item in root.GetChildrenAsList.Items.Where(x => x.GetPropertyValue("UmbracoNaviHide") != "1"))
        {
            var selected = Array.IndexOf(Model.Path.Split(','), item.Id.ToString()) >= 0 ? " class=\"active\"" : string.Empty;
           
            List<DynamicNode> listChildren = item.GetChildrenAsList.Items.Where(x => x.NodeTypeAlias == "Textpage").ToList();

            if (listChildren.Count() > 0)
            {
                <li class="dropdown">
                <a href="@item.Url" class="dropdown-toggle" data-toggle="dropdown">@item.Name</a>
                <ul class="dropdown-menu">
                @foreach (DynamicNode subItem in listChildren)
                {
                    <li><a href="@subItem.Url">@subItem.Name</a></li>
                }
                </ul>
                </li>
            }
            else
            {
                <[email protected](selected)><a href="@item.Url">@item.Name</a></li>
            }
        }
        </ul>
    }

     

  • Jorge Lusar 150 posts 489 karma points
    Aug 15, 2012 @ 10:31
    Jorge Lusar
    0

    Hi Fabrice,

    Thanks for letting me know! Yes, using DynamicNode definetely helps as you get also intellisense in Visual Studio as well. Anyway, if you are having some perfomance issues with your razor view, I'd suggest to vote on http://umbraco.codeplex.com/workitem/30745 and/or post it on the https://groups.google.com/forum/#!topic/umbraco-dev/ZzP2L0c_znA%5B1-25%5D

    Cheers,

    Jorge

Please Sign in or register to post replies

Write your reply to:

Draft