Copied to clipboard

Flag this post as spam?

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


  • Lloyd Dupont 7 posts 78 karma points
    Mar 24, 2016 @ 00:01
    Lloyd Dupont
    0

    Back office: custom page per node

    Hi,

    I have made an umbraco backoffice extension / application. I try to show a specific page for each of my navigation tree's node.

    here is how I "try" to create a node:

    public class TablesTreeController : TreeController
    {
        protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
        {
            var nodes = new TreeNodeCollection();
            switch (id)
            {
                case Root:
                    {
                        // other nodes...
                        nodes.Add(CreateTreeNode("Special", Root, queryStrings, "Hello Special", "bin.png", "/mySection/user.html"));
                    }
                    break;
            }
            return nodes;
        }
    }
    

    But when I click on the "Special node" the browser goes "http://~/umbraco#/" I just can't manage to display any custom page! :'(

    Remark I already have pages going where all child nodes share the same page.html, page.js. I explicitly want individual specific page for each node. That's the problem!!

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 24, 2016 @ 15:50
    David Brendel
    0

    Hi Lloyd,

    Umbraco uses some conventions for the page routing. Your view path violates that Konvention I think.

    I use this Form to set custom view: FormDataCollectionExtensions.GetValue

    Hope that helps

    Regards David

Please Sign in or register to post replies

Write your reply to:

Draft