I want to change the admin login screen logo on my 2.4.7 install.
I’ve followed every guide, and tried every answer I can find.
Only have a basic knowledge of Magento backend.
Can anyone see the mistake there must be in my theme and module files?
(I’ve replaced my vendor name and theme name with placeholders, but have tried carefully following other guides using their naming.)
Commands:
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean
Magento is set to developer mode.
design > adminhtml > vendor > theme > theme.xml
<?xml version="1.0"?>
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Theme</title>
<parent>Magento/backend</parent>
</theme>
design > adminhtml > vendor > theme > registration.php
<?php
use MagentoFrameworkComponentComponentRegistrar;
ComponentRegistrar::register(ComponentRegistrar::THEME, 'adminhtml/vendor/theme', __DIR__);
Logo File:
design > adminhtml > vendor > theme > Magento_Backend > web > images > adminlogin-logo.png
design > adminhtml > vendor > theme > Magento_Backend > layout > admin_login.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="logo">
<arguments>
<argument name="logo_image_src" xsi:type="string">images/adminlogin-logo.png</argument>
<argument name="logo_width" xsi:type="number">150</argument>
<argument name="logo_height" xsi:type="number">80</argument>
</arguments>
</referenceBlock>
</body>
</page>
code > vendor > theme > registration.php
<?php
use MagentoFrameworkComponentComponentRegistrar;
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'vendor_theme', __DIR__);
code > vendor > theme > etc > di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoThemeModelViewDesign">
<arguments>
<argument name="themes" xsi:type="array">
<item name="adminhtml" xsi:type="string">vendor/Theme</item>
</argument>
</arguments>
</type>
</config>
code > vendor > theme > etc > module.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="vendor_theme">
<sequence>
<module name="Magento_Theme"/>
</sequence>
</module>
</config>
Any mostly beginner help appreciated! 🙂