Copied to clipboard

Flag this post as spam?

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


  • Martin Rud 261 posts 1022 karma points c-trib
    Nov 27, 2022 @ 15:09
    Martin Rud
    0

    How to make changes to /wwwroot/umbraco/views/content/create.html?

    I want to make some changes to this file:

    /wwwroot/umbraco/views/content/create.html
    

    I.e. changes to the create document dialogue (hide some of the document types for some editors).

    How do I do that? The /umbraco/ folder isn't in my source code, but only 'unzipped' and taken into the webdeploy on publish.

    Is there somewhere else I can hook into/create my changed create.html file?

  • Bo Jacobsen 610 posts 2409 karma points
    Nov 27, 2022 @ 20:16
    Bo Jacobsen
    100

    Hi Martin.

    You could use a http interceptor and replace umbraco's create.html with your own, without having to make any changes to the original create.html.

    angular.module('umbraco.services').config([
        '$httpProvider',
        function ($httpProvider) {
            $httpProvider.interceptors.push(function ($q) {
                return {
                    'request': function (request) {
                        if (request.url.startsWith("views/content/create.html")) {
                            request.url = "../path/to/your/own/create.html";
                        }
                        return request || $q.when(request);
                    }
                };
            });
        }
    ]);
    
  • Martin Rud 261 posts 1022 karma points c-trib
    Dec 05, 2022 @ 06:32
    Martin Rud
    0

    Thanks. :) Found a package (https://github.com/nathanwoulfe/Clip) instead to do the job so I haven't tried this. But mark it as a solution. 😊

  • 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