Copied to clipboard

Flag this post as spam?

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


  • Robin Overgaard 33 posts 73 karma points
    Aug 30, 2014 @ 10:27
    Robin Overgaard
    0

    Custom Section - Root and Children routes?

    Hi guys

    Why does the root node look for the html file in /views/ and not in /app_plugins/?

    When this is reversed for children.

     

    I would like to keep my plugins together, either in the views or app_plugins folder, it dont seem to me to be good practices to split it up.

     

    Anyone have the same issue, and maybe a workaround for it ?

     

    Thanks in advanced

    /Robin

  • David 28 posts 156 karma points
    Mar 22, 2017 @ 09:24
    David
    0

    Hello Robin,

    as I know some routes are in Umbraco fix. If you create in your section some trees they will always route on "/#/sectionname". The children of this routeelement can change the route. For examle you got a html file which you want to display on the right. That works in your treecontroller.

          protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
        {
            var nodes = new TreeNodeCollection();
    
            if (id == Constants.System.Root.ToInvariantString())
            {
                nodes.Add(CreateTreeNode("NODEALIAS", "-1", queryStrings, "NODENAME", "icon-settings", false, "/SECTIONNAME/FOLDERNAME_IN_TREE/HTMLFILENAME/1"));
            }}
    

    I hope i could help you a bit. If you have found out a better way. Please tell me. Thank you! :)

Please Sign in or register to post replies

Write your reply to:

Draft