Copied to clipboard

Flag this post as spam?

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


  • Craig100 1136 posts 2523 karma points c-trib
    Apr 20, 2020 @ 13:36
    Craig100
    0

    How to change the Umbraco logo on the login page

    Umb V8.6.0

    In V7 these were my instructions to change the logo on the login page:-

    Logo
    Images are in: umbraco\assets\img\application
    and the login view is in: umbraco\Views\common\dialogs\login.html
    <img ng-src="assets/img/application/logo.png" ng-srcset="assets/img/application/[email protected] 2x, assets/img/application/[email protected] 3x">
    

    Unfortunately the login view is now empty in V8 and if I search for <img src="assets/img/application/umbraco_logo_white.svg"> or just the file in the whole solution, any file type, I get nothing.

    So, how do we change the login page logo without having to rename the logo you want to use as umbraco_logo_white.svg?

    Thanks,

    / Craig

  • Craig100 1136 posts 2523 karma points c-trib
    Apr 20, 2020 @ 20:09
    Craig100
    0

    If I'd have included the Umbraco folder in the project the search would have told me it's in \umbraco\views\components\application\umb-login.html !

    Having changed the path to the image I want, I can't get it to show. I've touched web.config, bumped the clientdependency number, restarted the app pool, flushed all caches and rebuilt indexes but the Umbraco logo still stands proud. How can I get rid of it? lol In the browser dev tools if I replace the umbraco logo path with mine the new logo shows up fine so I know the path is correct in code, just can't get it to show.

    Any advice anyone?

    TIA

    / Craig

  • Craig100 1136 posts 2523 karma points c-trib
    Apr 21, 2020 @ 13:03
    Craig100
    0

    Found a further reference at \Umbraco\Js\umbraco.directives.js Ln: 635 which I also changed, restarted site, etc as before but still get the Umbraco logo on the login page instead of my client's.

    If I rename umbraco_logo_white.svg then it disappears immediately. Somewhere some code is caching or forcing it to be shown over and above the two places I've already changed it.

    /Craig

  • Søren Kottal 712 posts 4570 karma points MVP 6x c-trib
    Apr 21, 2020 @ 13:58
    Søren Kottal
    1

    Hi Craig

    If I were you I would either redirect the url /assets/img/application/umbraco_logo_white.svg to the location of my own logo using rewrite rules in web.config, or add some CSS to work with the logo through a package.manifest file.

    This is what I have in my baseline project:

    umb-login .login-overlay #login:after {
        content: url("data:image/svg+xml,%3Csvg view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        left: 65px;
        height: 15px;
        width: 65px;
    }
    
    umb-login .login-overlay .login-overlay__background-image, .umb-login .login-overlay__background-image--2 {
        background-image: url('/App_Plugins/Ecreo.Branding/login.jpg?saturation=-50&tint=293c55&width=1600') !important;
    }
    

    The css file is then referenced in a package.manifest file in a folder in App_Plugins like so:

    {
        // array of files we want to inject into the application
        "css": [
            "~/App_Plugins/Ecreo.Branding/branding.css"
        ]
    }
    

    With this, I get my own logo next to the Umbraco logo (the first CSS rule), and a custom background image automatically tinted in Umbracos colours, just by adding the image as /App_Plugins/Ecreo.Branding/login.jpg

  • Craig100 1136 posts 2523 karma points c-trib
    Apr 21, 2020 @ 14:28
    Craig100
    0

    Thanks Søren, I'll give it a try.

    They've sure made it awkward. Used to be a doddle lol

    /Craig

  • Søren Kottal 712 posts 4570 karma points MVP 6x c-trib
    Apr 21, 2020 @ 15:30
    Søren Kottal
    0

    They've made the backoffice load a lot faster by inlining much of the html in the js bundle, that is what they've made :)

  • Craig100 1136 posts 2523 karma points c-trib
    Apr 21, 2020 @ 17:04
    Craig100
    0

    It's not that streamlined if there's code being downloaded that's not used ;)

    The login page isn't really something I'd thought of as having to be super quick and efficient. It's not like it's going to be hit concurrently a thousand times a minute.

    Rebranding is a reasonable thing to be able to do so it should be either easy (obvious) or documented. I'll see about raising an issue on GitHub.

    / Craig

  • Paul Wright (suedeapple) 277 posts 704 karma points
    Apr 21, 2020 @ 17:08
    Paul Wright (suedeapple)
    0

    Celebrate and embrace the "Umbraco-ness"

    No need to hide it :-D

  • Ronald Barendse 39 posts 217 karma points hq c-trib
    Apr 21, 2020 @ 22:46
    Ronald Barendse
    1

    You'd be amazed at how many people might need to load the login page, as Umbraco redirects everyone to this page when it's in upgrade mode!

  • Craig100 1136 posts 2523 karma points c-trib
    Apr 21, 2020 @ 23:41
    Craig100
    0

    You'll have to explain that one to me Ronald.

    Why would you have thousands of editors logging into the same site at once, like you might well have thousands of actual visitors trying to open any client page on a site at once? I don't get it at all.

    / Craig

  • Ronald Barendse 39 posts 217 karma points hq c-trib
    Apr 22, 2020 @ 08:30
    Ronald Barendse
    0

    Whenever Umbraco boots up and goes into upgrade mode (because the Umbraco.Core.ConfigurationStatus application setting is empty/different than the assembly version or migrations are missing/not run), every client page will be redirected to the Umbraco back-office login page!

    An administrator needs to login and accept the upgrade, but untill then: all website visitors will see the login screen...

  • Craig100 1136 posts 2523 karma points c-trib
    Apr 22, 2020 @ 08:44
    Craig100
    0

    Ok, but surely that's a bit of an edge case.

    Anyway, we have strayed away from the post's original intent which has been satisfied. Thanks to all contributors ;)

    /Craig

  • Craig100 1136 posts 2523 karma points c-trib
    Apr 21, 2020 @ 17:16
    Craig100
    101

    Companies don't care nor want to know about the pipework. All they want to see is their own logo so they get that warm and cosy feeling. The IT dept know it's Umbraco, sales and marketing couldn't care less.

    Implemented the redirect as Søren suggested, worked a treat thanks. Code is:-

          <rule name="Redirects umbraco logo to client's logo on login page" stopProcessing="true">
              <match url=".*" />
              <conditions>
                  <add input="{REQUEST_URI}" pattern="/assets/img/application/umbraco_logo_white.svg$" />
              </conditions>
              <action type="Redirect" url="/images/logo/company_logo.png" appendQueryString="false" redirectType="Permanent" />
          </rule>
    
  • Paul Wright (suedeapple) 277 posts 704 karma points
    Apr 21, 2020 @ 17:19
    Paul Wright (suedeapple)
    0

    hahaha cool!

    Hope you sent in that invoice then :-)

  • Nate M 16 posts 136 karma points
    Aug 12, 2024 @ 18:42
    Nate M
    0

    I know this is old, but here is how to change the logo and background image of the login page.

    1. Copy and paste the image(s) you want to be displayed on the login screen in the Umbraco > assets > img folder.
    2. In the config folder, open umbracoSettings.config.
    3. Scroll down until you find <loginBackgroundImage> and change the filename to the image name you pasted.
    4. You can change the logo as well by changing the filename to the image name you pasted in the <loginLogoImage>

    I hope this helps.

Please Sign in or register to post replies

Write your reply to:

Draft