Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Magento 2 Theme Design

You're reading from   Magento 2 Theme Design Create stunning and responsive Magento 2 themes for your business

Arrow left icon
Product type Paperback
Published in Oct 2016
Publisher Packt
ISBN-13 9781785888229
Length 288 pages
Edition 2nd Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Richard Carter Richard Carter
Author Profile Icon Richard Carter
Richard Carter
Fernando J Miguel Fernando J Miguel
Author Profile Icon Fernando J Miguel
Fernando J Miguel
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Introduction to Magento 2 FREE CHAPTER 2. Exploring Magento Themes 3. Magento 2 Theme Layout 4. Magento UI Library 5. Creating a Responsive Magento 2 Theme 6. Magento 2 Styles Debugging 7. Magento UI Components 8. Magento Layout Development 9. Magento 2 JavaScript 10. Social Media in Magento 2 11. Theme Development Best Practices 12. Magento Theme Distribution

Creating a theme logo


By default, in Magento 2 the theme logo is always recognized by the system with the name logo.svg. The Magento 2 also recognizes the logo's default directory as <theme_dir>/web/images/logo.svg. So, if you have a logo.svg file, you simply put the file in the right directory.

But if you want to work with a different logo name with a different format, you have to declare it in Magento by using the layout files declaration. We will make a declaration for this new logo in the Magento_Theme directory, because the new logo overrides the Magento_Theme module.

We will override this module by taking advantage of the fallback system. As you may have noticed, Magento has a specific pattern of declaring elements. It's the way that Magento organize its life cycle.

Let's declare a new theme logo:

  1. Choose one logo for the example and save the file as logo.png in app/design/frontend/Packt/helloworld/Magento_Theme/web/images directory.

  2. Move your new logo.png image to the images directory...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime