Copied to clipboard

Flag this post as spam?

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


  • Sherlon 13 posts 113 karma points
    May 06, 2019 @ 14:14
    Sherlon
    0

    UmbClientMgr.contentFrame not working anymore in Umbraco 8

    Hi, We started upgrading our umbraco component (with a tree section using TreeController) to version 8. We are using the ASP.NET MVC razor views to display our pages. Previously we were able to use this code UmbClientMgr.contentFrame to redirect to another page. But unfortunately this is not working anymore. I've been trying with angular, see below, angular is neither not working.

        (function () {
            'use strict';
            app.controller('MyController', function MyController($scope, $location, $routeParams, navigationService, appState) {              
    
                $scope.redirect = function (id) {     
                    var url = 'var url = '/backoffice%2fsection%2forder%2findex%2f1%3ftreepath%3dorders';'
                    navigationService.clearSearch();
                    navigationService.loadLegacyIFrame(url);
    
                };
            });
            'use strict';
        })();
    

    Actually nothing is happing when using angular to redirect.

    I already spent a big amount of time trying to figure this out.

    Any help will be appreciated.

    Regards, Sherlon

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    May 06, 2019 @ 15:05
    Søren Gregersen
    0

    why no do it like is was intended, and create angular controllers and views for all the "pages"?

  • Sherlon 13 posts 113 karma points
    May 06, 2019 @ 16:53
    Sherlon
    0

    Thats going to be a very intensive and time consuming task to rewrite this component to angular controllers and views. It is a very big component (section). There must be a workaround! Umbraco 7 had this file LegacyUmbClientMgr.js with this method contentFrame: function (strLocation)

    What is the workaround to solve this problem in umbraco 8?

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    May 06, 2019 @ 17:31
    Søren Gregersen
    0

    One of the goals of v8 was to remove stuff like that :)

    https://github.com/umbraco/Umbraco-CMS/commit/4f2ed545da917fe85c0783c56be466a1966ff321#diff-ef5999fb0a5a949f34977d0aa581e133

    I would suggest you implementing it yourself (Should just be a wrapper for an iframe).

Please Sign in or register to post replies

Write your reply to:

Draft