Magento admin logo change!
I am trying to change Magento2.2.2 admin logo.
But no success.
This is what I have done:
This file app/design/adminhtml/XXX/yyy/theme.xml
contains:
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Xy_Theme</title>
<parent>Magento/backend</parent>
</theme>
This file app/design/adminhtml/XXX/yyy/registration.php
contains:
<?php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'adminhtml/XXX/yyy',
__DIR__
);
This file app/design/adminhtml/XXX/yyy/Magento_Theme/layout/default.xml
contains:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>Admin Title</title>
</head>
<body>
<referenceContainer name="header">
<block class="MagentoBackendBlockPageHeader" name="logo" before="-">
<arguments>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
<argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>
<argument name="logo_alt" xsi:type="string">My Admin</argument>
</arguments>
</block>
</referenceContainer>
</body>
And finally my logo image is inapp/design/adminhtml/XXX/yyy/web/images/my-logo.svg
magento2 magento-2.1
add a comment |
I am trying to change Magento2.2.2 admin logo.
But no success.
This is what I have done:
This file app/design/adminhtml/XXX/yyy/theme.xml
contains:
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Xy_Theme</title>
<parent>Magento/backend</parent>
</theme>
This file app/design/adminhtml/XXX/yyy/registration.php
contains:
<?php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'adminhtml/XXX/yyy',
__DIR__
);
This file app/design/adminhtml/XXX/yyy/Magento_Theme/layout/default.xml
contains:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>Admin Title</title>
</head>
<body>
<referenceContainer name="header">
<block class="MagentoBackendBlockPageHeader" name="logo" before="-">
<arguments>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
<argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>
<argument name="logo_alt" xsi:type="string">My Admin</argument>
</arguments>
</block>
</referenceContainer>
</body>
And finally my logo image is inapp/design/adminhtml/XXX/yyy/web/images/my-logo.svg
magento2 magento-2.1
add a comment |
I am trying to change Magento2.2.2 admin logo.
But no success.
This is what I have done:
This file app/design/adminhtml/XXX/yyy/theme.xml
contains:
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Xy_Theme</title>
<parent>Magento/backend</parent>
</theme>
This file app/design/adminhtml/XXX/yyy/registration.php
contains:
<?php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'adminhtml/XXX/yyy',
__DIR__
);
This file app/design/adminhtml/XXX/yyy/Magento_Theme/layout/default.xml
contains:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>Admin Title</title>
</head>
<body>
<referenceContainer name="header">
<block class="MagentoBackendBlockPageHeader" name="logo" before="-">
<arguments>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
<argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>
<argument name="logo_alt" xsi:type="string">My Admin</argument>
</arguments>
</block>
</referenceContainer>
</body>
And finally my logo image is inapp/design/adminhtml/XXX/yyy/web/images/my-logo.svg
magento2 magento-2.1
I am trying to change Magento2.2.2 admin logo.
But no success.
This is what I have done:
This file app/design/adminhtml/XXX/yyy/theme.xml
contains:
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Xy_Theme</title>
<parent>Magento/backend</parent>
</theme>
This file app/design/adminhtml/XXX/yyy/registration.php
contains:
<?php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'adminhtml/XXX/yyy',
__DIR__
);
This file app/design/adminhtml/XXX/yyy/Magento_Theme/layout/default.xml
contains:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>Admin Title</title>
</head>
<body>
<referenceContainer name="header">
<block class="MagentoBackendBlockPageHeader" name="logo" before="-">
<arguments>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
<argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>
<argument name="logo_alt" xsi:type="string">My Admin</argument>
</arguments>
</block>
</referenceContainer>
</body>
And finally my logo image is inapp/design/adminhtml/XXX/yyy/web/images/my-logo.svg
magento2 magento-2.1
magento2 magento-2.1
edited May 14 '18 at 4:54
Teja Bhagavan Kollepara
2,94841847
2,94841847
asked Dec 16 '17 at 12:45
AmandaAmanda
211
211
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Try this code:
- app/code/[VendorName]/[ModuleName]/registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'[VendorName]_[ModuleName]',
__DIR__
);
- app/code/[VendorName]/[ModuleName]/etc/module.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="[VendorName]_[ModuleName]" setup_version="1.0.0">
<sequence>
<module name="Magento_Theme"/>
</sequence>
</module>
</config>
- app/code/[VendorName]/[ModuleName]/etc/di.xml
<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">[VendorName]/[themename]</item>
</argument>
</arguments>
</type>
</config>
- app/design/adminhtml/[VendorName]/[themename]/registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'adminhtml/[VendorName]/[themename]',
__DIR__
);
- app/design/adminhtml/[VendorName]/[themename]/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Theme Title</title>
<parent>Magento/backend</parent>
</theme>
- app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/admin_login.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="styles" />
<body>
<referenceBlock name="logo">
<arguments>
<argument name="logo_image_src" xsi:type="string">images/login-logo.svg</argument>
</arguments>
</referenceBlock>
</body>
</page>
- app/design/adminhtml/[VendorName]/[themename]/web/images/login-logo.svg
- app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header">
<referenceBlock name="logo">
<arguments>
<argument name="logo_img_width" xsi:type="number">300</argument>
<argument name="logo_img_height" xsi:type="number">300</argument>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
<argument name="logo_image_src" xsi:type="string">images/menu-logo.svg</argument>
</arguments>
</referenceBlock>
</referenceContainer>
</body>
</page>
- app/design/adminhtml/[VendorName]/[themename]/web/images/menu-logo.svg
- Magento CLI
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Note:
- For Admin login page logo change, follow steps - 6 & 7
- For Admin menu
logo change, follow steps - 8 & 9
Note:
Feel free to use PNG files instead of SVG for logo.
Note:
If changes not reflected on Admin pages then try below steps:
Uninstall a manually added theme
mysql -u <user> -p -e "delete from <dbname>.theme where theme_path ='<VendorName>/<themename>' AND area ='adminhtml' limit 1"
Upgrades the Magento application, DB data, and schema
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Is it necessary to createapp/code/[VendorName]/[ModuleName]
? Only creatingadminhtml
theme won't work ?
– Slimshadddyyy
Jan 3 '18 at 8:29
@Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.
– Pratik Oza
Jan 3 '18 at 11:52
magento.stackexchange.com/questions/207833/…
– Slimshadddyyy
Jan 3 '18 at 11:55
add a comment |
We have implemented a solution which does exactly the same. It allows you to replace the logo on the admin login page as well as on top of the admin navigation without creating a new theme. Beside that you can put a text ( e.g Implemented by Your Company ) below the Sign In button. Check out https://shop.magenizr.com/?module=1007
We simply use a helper method in order to replace the src of the logo.
<argument name="logo_image_src" xsi:type="helper" helper="VendorModuleHelperData::getAdminLogoSrc">
The above argument must be placed in VendorModuleviewadminhtmllayoutadmin_login.xml
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f206100%2fmagento-admin-logo-change%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try this code:
- app/code/[VendorName]/[ModuleName]/registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'[VendorName]_[ModuleName]',
__DIR__
);
- app/code/[VendorName]/[ModuleName]/etc/module.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="[VendorName]_[ModuleName]" setup_version="1.0.0">
<sequence>
<module name="Magento_Theme"/>
</sequence>
</module>
</config>
- app/code/[VendorName]/[ModuleName]/etc/di.xml
<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">[VendorName]/[themename]</item>
</argument>
</arguments>
</type>
</config>
- app/design/adminhtml/[VendorName]/[themename]/registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'adminhtml/[VendorName]/[themename]',
__DIR__
);
- app/design/adminhtml/[VendorName]/[themename]/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Theme Title</title>
<parent>Magento/backend</parent>
</theme>
- app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/admin_login.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="styles" />
<body>
<referenceBlock name="logo">
<arguments>
<argument name="logo_image_src" xsi:type="string">images/login-logo.svg</argument>
</arguments>
</referenceBlock>
</body>
</page>
- app/design/adminhtml/[VendorName]/[themename]/web/images/login-logo.svg
- app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header">
<referenceBlock name="logo">
<arguments>
<argument name="logo_img_width" xsi:type="number">300</argument>
<argument name="logo_img_height" xsi:type="number">300</argument>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
<argument name="logo_image_src" xsi:type="string">images/menu-logo.svg</argument>
</arguments>
</referenceBlock>
</referenceContainer>
</body>
</page>
- app/design/adminhtml/[VendorName]/[themename]/web/images/menu-logo.svg
- Magento CLI
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Note:
- For Admin login page logo change, follow steps - 6 & 7
- For Admin menu
logo change, follow steps - 8 & 9
Note:
Feel free to use PNG files instead of SVG for logo.
Note:
If changes not reflected on Admin pages then try below steps:
Uninstall a manually added theme
mysql -u <user> -p -e "delete from <dbname>.theme where theme_path ='<VendorName>/<themename>' AND area ='adminhtml' limit 1"
Upgrades the Magento application, DB data, and schema
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Is it necessary to createapp/code/[VendorName]/[ModuleName]
? Only creatingadminhtml
theme won't work ?
– Slimshadddyyy
Jan 3 '18 at 8:29
@Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.
– Pratik Oza
Jan 3 '18 at 11:52
magento.stackexchange.com/questions/207833/…
– Slimshadddyyy
Jan 3 '18 at 11:55
add a comment |
Try this code:
- app/code/[VendorName]/[ModuleName]/registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'[VendorName]_[ModuleName]',
__DIR__
);
- app/code/[VendorName]/[ModuleName]/etc/module.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="[VendorName]_[ModuleName]" setup_version="1.0.0">
<sequence>
<module name="Magento_Theme"/>
</sequence>
</module>
</config>
- app/code/[VendorName]/[ModuleName]/etc/di.xml
<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">[VendorName]/[themename]</item>
</argument>
</arguments>
</type>
</config>
- app/design/adminhtml/[VendorName]/[themename]/registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'adminhtml/[VendorName]/[themename]',
__DIR__
);
- app/design/adminhtml/[VendorName]/[themename]/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Theme Title</title>
<parent>Magento/backend</parent>
</theme>
- app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/admin_login.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="styles" />
<body>
<referenceBlock name="logo">
<arguments>
<argument name="logo_image_src" xsi:type="string">images/login-logo.svg</argument>
</arguments>
</referenceBlock>
</body>
</page>
- app/design/adminhtml/[VendorName]/[themename]/web/images/login-logo.svg
- app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header">
<referenceBlock name="logo">
<arguments>
<argument name="logo_img_width" xsi:type="number">300</argument>
<argument name="logo_img_height" xsi:type="number">300</argument>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
<argument name="logo_image_src" xsi:type="string">images/menu-logo.svg</argument>
</arguments>
</referenceBlock>
</referenceContainer>
</body>
</page>
- app/design/adminhtml/[VendorName]/[themename]/web/images/menu-logo.svg
- Magento CLI
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Note:
- For Admin login page logo change, follow steps - 6 & 7
- For Admin menu
logo change, follow steps - 8 & 9
Note:
Feel free to use PNG files instead of SVG for logo.
Note:
If changes not reflected on Admin pages then try below steps:
Uninstall a manually added theme
mysql -u <user> -p -e "delete from <dbname>.theme where theme_path ='<VendorName>/<themename>' AND area ='adminhtml' limit 1"
Upgrades the Magento application, DB data, and schema
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Is it necessary to createapp/code/[VendorName]/[ModuleName]
? Only creatingadminhtml
theme won't work ?
– Slimshadddyyy
Jan 3 '18 at 8:29
@Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.
– Pratik Oza
Jan 3 '18 at 11:52
magento.stackexchange.com/questions/207833/…
– Slimshadddyyy
Jan 3 '18 at 11:55
add a comment |
Try this code:
- app/code/[VendorName]/[ModuleName]/registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'[VendorName]_[ModuleName]',
__DIR__
);
- app/code/[VendorName]/[ModuleName]/etc/module.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="[VendorName]_[ModuleName]" setup_version="1.0.0">
<sequence>
<module name="Magento_Theme"/>
</sequence>
</module>
</config>
- app/code/[VendorName]/[ModuleName]/etc/di.xml
<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">[VendorName]/[themename]</item>
</argument>
</arguments>
</type>
</config>
- app/design/adminhtml/[VendorName]/[themename]/registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'adminhtml/[VendorName]/[themename]',
__DIR__
);
- app/design/adminhtml/[VendorName]/[themename]/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Theme Title</title>
<parent>Magento/backend</parent>
</theme>
- app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/admin_login.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="styles" />
<body>
<referenceBlock name="logo">
<arguments>
<argument name="logo_image_src" xsi:type="string">images/login-logo.svg</argument>
</arguments>
</referenceBlock>
</body>
</page>
- app/design/adminhtml/[VendorName]/[themename]/web/images/login-logo.svg
- app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header">
<referenceBlock name="logo">
<arguments>
<argument name="logo_img_width" xsi:type="number">300</argument>
<argument name="logo_img_height" xsi:type="number">300</argument>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
<argument name="logo_image_src" xsi:type="string">images/menu-logo.svg</argument>
</arguments>
</referenceBlock>
</referenceContainer>
</body>
</page>
- app/design/adminhtml/[VendorName]/[themename]/web/images/menu-logo.svg
- Magento CLI
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Note:
- For Admin login page logo change, follow steps - 6 & 7
- For Admin menu
logo change, follow steps - 8 & 9
Note:
Feel free to use PNG files instead of SVG for logo.
Note:
If changes not reflected on Admin pages then try below steps:
Uninstall a manually added theme
mysql -u <user> -p -e "delete from <dbname>.theme where theme_path ='<VendorName>/<themename>' AND area ='adminhtml' limit 1"
Upgrades the Magento application, DB data, and schema
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Try this code:
- app/code/[VendorName]/[ModuleName]/registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'[VendorName]_[ModuleName]',
__DIR__
);
- app/code/[VendorName]/[ModuleName]/etc/module.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="[VendorName]_[ModuleName]" setup_version="1.0.0">
<sequence>
<module name="Magento_Theme"/>
</sequence>
</module>
</config>
- app/code/[VendorName]/[ModuleName]/etc/di.xml
<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">[VendorName]/[themename]</item>
</argument>
</arguments>
</type>
</config>
- app/design/adminhtml/[VendorName]/[themename]/registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'adminhtml/[VendorName]/[themename]',
__DIR__
);
- app/design/adminhtml/[VendorName]/[themename]/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Theme Title</title>
<parent>Magento/backend</parent>
</theme>
- app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/admin_login.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="styles" />
<body>
<referenceBlock name="logo">
<arguments>
<argument name="logo_image_src" xsi:type="string">images/login-logo.svg</argument>
</arguments>
</referenceBlock>
</body>
</page>
- app/design/adminhtml/[VendorName]/[themename]/web/images/login-logo.svg
- app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header">
<referenceBlock name="logo">
<arguments>
<argument name="logo_img_width" xsi:type="number">300</argument>
<argument name="logo_img_height" xsi:type="number">300</argument>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
<argument name="logo_image_src" xsi:type="string">images/menu-logo.svg</argument>
</arguments>
</referenceBlock>
</referenceContainer>
</body>
</page>
- app/design/adminhtml/[VendorName]/[themename]/web/images/menu-logo.svg
- Magento CLI
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Note:
- For Admin login page logo change, follow steps - 6 & 7
- For Admin menu
logo change, follow steps - 8 & 9
Note:
Feel free to use PNG files instead of SVG for logo.
Note:
If changes not reflected on Admin pages then try below steps:
Uninstall a manually added theme
mysql -u <user> -p -e "delete from <dbname>.theme where theme_path ='<VendorName>/<themename>' AND area ='adminhtml' limit 1"
Upgrades the Magento application, DB data, and schema
php bin/magento setup:upgrade
php bin/magento setup:di:compile
edited Dec 17 '17 at 6:32
answered Dec 17 '17 at 5:59
Pratik OzaPratik Oza
1,966411
1,966411
Is it necessary to createapp/code/[VendorName]/[ModuleName]
? Only creatingadminhtml
theme won't work ?
– Slimshadddyyy
Jan 3 '18 at 8:29
@Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.
– Pratik Oza
Jan 3 '18 at 11:52
magento.stackexchange.com/questions/207833/…
– Slimshadddyyy
Jan 3 '18 at 11:55
add a comment |
Is it necessary to createapp/code/[VendorName]/[ModuleName]
? Only creatingadminhtml
theme won't work ?
– Slimshadddyyy
Jan 3 '18 at 8:29
@Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.
– Pratik Oza
Jan 3 '18 at 11:52
magento.stackexchange.com/questions/207833/…
– Slimshadddyyy
Jan 3 '18 at 11:55
Is it necessary to create
app/code/[VendorName]/[ModuleName]
? Only creating adminhtml
theme won't work ?– Slimshadddyyy
Jan 3 '18 at 8:29
Is it necessary to create
app/code/[VendorName]/[ModuleName]
? Only creating adminhtml
theme won't work ?– Slimshadddyyy
Jan 3 '18 at 8:29
@Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.
– Pratik Oza
Jan 3 '18 at 11:52
@Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.
– Pratik Oza
Jan 3 '18 at 11:52
magento.stackexchange.com/questions/207833/…
– Slimshadddyyy
Jan 3 '18 at 11:55
magento.stackexchange.com/questions/207833/…
– Slimshadddyyy
Jan 3 '18 at 11:55
add a comment |
We have implemented a solution which does exactly the same. It allows you to replace the logo on the admin login page as well as on top of the admin navigation without creating a new theme. Beside that you can put a text ( e.g Implemented by Your Company ) below the Sign In button. Check out https://shop.magenizr.com/?module=1007
We simply use a helper method in order to replace the src of the logo.
<argument name="logo_image_src" xsi:type="helper" helper="VendorModuleHelperData::getAdminLogoSrc">
The above argument must be placed in VendorModuleviewadminhtmllayoutadmin_login.xml
add a comment |
We have implemented a solution which does exactly the same. It allows you to replace the logo on the admin login page as well as on top of the admin navigation without creating a new theme. Beside that you can put a text ( e.g Implemented by Your Company ) below the Sign In button. Check out https://shop.magenizr.com/?module=1007
We simply use a helper method in order to replace the src of the logo.
<argument name="logo_image_src" xsi:type="helper" helper="VendorModuleHelperData::getAdminLogoSrc">
The above argument must be placed in VendorModuleviewadminhtmllayoutadmin_login.xml
add a comment |
We have implemented a solution which does exactly the same. It allows you to replace the logo on the admin login page as well as on top of the admin navigation without creating a new theme. Beside that you can put a text ( e.g Implemented by Your Company ) below the Sign In button. Check out https://shop.magenizr.com/?module=1007
We simply use a helper method in order to replace the src of the logo.
<argument name="logo_image_src" xsi:type="helper" helper="VendorModuleHelperData::getAdminLogoSrc">
The above argument must be placed in VendorModuleviewadminhtmllayoutadmin_login.xml
We have implemented a solution which does exactly the same. It allows you to replace the logo on the admin login page as well as on top of the admin navigation without creating a new theme. Beside that you can put a text ( e.g Implemented by Your Company ) below the Sign In button. Check out https://shop.magenizr.com/?module=1007
We simply use a helper method in order to replace the src of the logo.
<argument name="logo_image_src" xsi:type="helper" helper="VendorModuleHelperData::getAdminLogoSrc">
The above argument must be placed in VendorModuleviewadminhtmllayoutadmin_login.xml
answered 10 mins ago
MagenizrMagenizr
112
112
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f206100%2fmagento-admin-logo-change%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown