Copied to clipboard

Flag this post as spam?

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


  • nickornotto 397 posts 900 karma points
    Jan 31, 2023 @ 00:16
    nickornotto
    0

    How to route TreeController nodes to MVC controller/action?

    In Umbraco 7 I could do:

    GetNode("2", "myNode", "My node name", "Cats", "Favourite")
    

    where the 4th parameter was controller name and the 5th - action name

    In Umbraco 10 I am trying to add a custom route in TreeController:

    string routePath = $"umbraco/backoffice/Cats/{rootNode.Id}";
    var node = CreateTreeNode(rootNode.Id, parentId, queryStrings, rootNode.Title, rootNode.Icon, rootNode.HasChildren, routePath);
    

    but it still seems to be trying to fetch html angularjs view - in this case:

    views/backoffice/cats.html
    

    The documentation does not say anything about it: https://docs.umbraco.com/v/10.x-lts/umbraco-cms/extending/section-trees/trees

    Is there a way to route custom section tree nodes via MVC pattern controller/ action or I really need to use angularjs in order to display my section views?

  • Drew Mayo 24 posts 125 karma points
    Jul 13, 2023 @ 19:48
    Drew Mayo
    0

    Hi did you ever figure out a solution to this problem? I'm looking to do something very similar and I could use a push in the right direction

Please Sign in or register to post replies

Write your reply to:

Draft