Copied to clipboard

Flag this post as spam?

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


  • Drew Mayo 24 posts 125 karma points
    Jan 08, 2019 @ 16:19
    Drew Mayo
    0

    Upgrading Trees from BaseTree to TreesController

    I'm updating our Umbraco version from 7.6.1 to 7.12.4 and I'm looking for help upgrading the Trees for our custom Sections.

    The custom Trees are based on BaseTree and I followed instructions on upgrading them to TreeController. However, the targets in the legacy sections as based on MVC which start by calling a MVC controller, where as the TreesController and CreateTreeNode method targets a specific html file and Angular takes it from there. Our existing Trees use the Render and RenderJS methods to trigger calls to the MVC controllers (which don't fire anymore, and I know from the upgrade guides they won't) and this is an edited sample:

        public override void RenderJS(ref System.Text.StringBuilder javascript)
        {
            javascript.Append(
                @"function openConnectionsCustomerServiceController() {
                    UmbClientMgr.contentFrame('/umbraco/backoffice/plugins/customerservice');
                }");
        }
    
        public override void Render(ref XmlTree tree)
        {
            RenderNode(tree, "3", "Customer Service", "javascript:openConnectionsCustomerServiceController();", "folder.gif", "folder_o.gif");
        }
    

    Could I ask for a push in the right direction for updating the Trees to do something similar? Unfortunately I can't get the time (management!) to upgrade the Sections to Angular. Any help is greatly appreciated,

    Drew

  • Drew Mayo 24 posts 125 karma points
    Jan 14, 2019 @ 16:51
    Drew Mayo
    0

    Can I ask again for a suggestion on which way to go?

    I can get a tree based on TreeController running, yet the nodes go to a physical file, yet I need a way to get the nodes to go to an MVC controller first.

    Thanks in advance, Drew

Please Sign in or register to post replies

Write your reply to:

Draft