Copied to clipboard

Flag this post as spam?

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


  • Simon Dingley 1470 posts 3427 karma points c-trib
    Jan 18, 2018 @ 14:46
    Simon Dingley
    0

    Root Node View Location for Custom Tree in Core Section

    I can create custom trees in custom sections fine at the moment and get them routing without issue but I'm having trouble with routing my root node view for a custom tree in the Developer section.

    [Tree("developer", "mytreealias", "My Tree Title", sortOrder: 8)]
    [PluginController("MyPluginName")]
    

    So, when someone clicks on the root node I want to open a view - what should the route and path to that view be considering it is not a custom section? I obviously don't want it to live in the Umbraco folder with the rest of the developer section views.

    The following currently fails to resolve the view that is placed in App_plugins/MyPluginName/backoffice/views/overview.html:

        protected override TreeNode CreateRootNode(FormDataCollection queryStrings)
        {
            var root = base.CreateRootNode(queryStrings);
            root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Developer, "mytreealias", "overview");
            root.Icon = "icon-tools";
    
            return root;
        }
    

    Thanks, Simon

Please Sign in or register to post replies

Write your reply to:

Draft