Copied to clipboard

Flag this post as spam?

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


  • Matty 34 posts 148 karma points
    Nov 04, 2023 @ 01:06
    Matty
    0

    How to Hijack existing BackOffice Route

    Hi Our,

    I have a need to replace the existing Media BackOffice page with a custom implementation. I'll likely have to do this again with other pages in the future so figuring out this problem would be nice in case I have to do it again for the Content or Users pages.

    I thought it would just be a case of creating a controller based of UmbracoAuthorizedController and then adding a composer to MapUmbracoRoute the same route as the existing Umbraco Media page, which I think is:

    var rootSegment = $"{globalSettings.GetUmbracoMvcArea(hostingEnvironment)}";
    endpoints.MapUmbracoRoute<NewMediaController>(rootSegment, "media", "", "Index", false);
    

    Am I on the right track? is this the correct way to go about this? Or is what I am trying to do impossible?

  • Matty 34 posts 148 karma points
    Nov 07, 2023 @ 03:48
    Matty
    0

    From what I can tell after looking at Umbraco.Cms.Web.BackOffice.Routing.BackOfficeAreaRoutes.MapMinimalBackOffice is that all of the backoffice is routed to Umbraco.Cms.Web.BackOffice.ControllersBackOfficeController which serves the login page umbraco/UmbracoBackOffice/Default.cshtml and then all routing from there in is done via Angular. Could be wrong, but that's what I suspect is going on since I haven't found any routes for the individual pages in the BackOffice.

    Looks like I might be replacing the whole thing 😐

Please Sign in or register to post replies

Write your reply to:

Draft