Copied to clipboard

Flag this post as spam?

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


  • shashi 4 posts 24 karma points
    Jun 19, 2014 @ 16:23
    shashi
    0

    How to directs Tree Nodes int to differents views

    In my back office area, I have created 3 nodes tree in my custom area, I need direct different 3 views to each nodes(by default it's edit.html)

     

    Once My Node1 click i need to show products page, My Node 2 Must shows Orders and My Node 3 must shows Suppliers.

    In Documentaion it says,

    Developers can specify a custom RoutePath for any tree node which will cause umbraco to route to that specific location

    Can some one point me how to specify the view. thanks in advance

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 20, 2014 @ 17:39
    Jan Skovgaard
    0

    Hi Shashi

    Could this article by Markus Jonhansson be what you're looking for? http://www.enkelmedia.se/blogg/2013/11/22/custom-sections-in-umbraco-7-%E2%80%93-part-2-the-views.aspx

    /Jan

  • shashi 4 posts 24 karma points
    Jun 21, 2014 @ 13:08
    shashi
    0

    Thank you very much for your reply Jan,

    yes I have followed the article and got worked custom section with the three tree nodes. but issue is still the same. when i click on the each node it display the edit.html. But i need diferent views(html pages).

    Urls displays respectively

    /Softhome/SofthomeTree/edit/dashboard_1

    /Softhome/SofthomeTree/edit/dashboard_2

    /Softhome/SofthomeTree/edit/dashboard_3

     

    my treenode collection like

    var tree = new TreeNodeCollection
                {
                    CreateTreeNode("dashboard_1", id, queryStrings, "My Node 1", "icon-server"),
                    CreateTreeNode("dashboard_2", id, queryStrings, "My Node 2", "icon-bus"),
                    CreateTreeNode("dashboard_3", id, queryStrings, "My Node 3", "icon-car")
                };

    is there aney way i can get dashboard_1.html, dashboard_2.html, dashboard_3.html insted of default edit.html.

    thank you very much

     

     

     

  • Taylor Mitchell 19 posts 43 karma points
    Sep 28, 2015 @ 13:53
    Taylor Mitchell
    0

    Were you ever able to figure this one out? I am having the same problem. Thank you

  • Michel Collard 44 posts 264 karma points c-trib
    Mar 23, 2016 @ 11:32
    Michel Collard
    0

    In your controller use the code at the bottom of my post.

    This will get the HTML page from your App_Plugins folder if your code is correct. (you can use this blog post for details)

        this.CreateTreeNode("dashboard_1", id, queryStrings, "My Node 1", "icon-server", false,
     FormDataCollectionExtensions.GetValue<string>(queryStrings, "application") + StringExtensions.EnsureStartsWith(this.TreeAlias, '/') + "/YourHTMLPageNameHere/" + id);
    
  • Aristotelis Pitaridis 84 posts 402 karma points
    Mar 23, 2016 @ 11:44
    Aristotelis Pitaridis
    0

    This is how I do it.

    var MyNode = this.CreateTreeNode("NodeID", id, queryStrings, "Node Name", "icon-windows", false, "/MySectionName/MyTreeName/NameOfHtmlFile/Parameter");
    
  • 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