Search icon CANCEL
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
Mastering Magento Theme Design

You're reading from   Mastering Magento Theme Design Magento is the super-capable open source e-commerce platform that's number one for a reason. By using this book to optimize your know-how, you'll be acquiring the ultimate in e-tail expertise for yourself and your clients.

Arrow left icon
Product type Paperback
Published in Apr 2014
Publisher
ISBN-13 9781783288236
Length 310 pages
Edition Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Andrea Sacca Andrea Sacca
Author Profile Icon Andrea Sacca
Andrea Sacca
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Mastering Magento Theme Design
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Introducing Magento Theme Design FREE CHAPTER 2. Creating a Responsive Magento Theme with Bootstrap 3 3. Customizing Our Custom Theme 4. Adding Incredible Effects to Our Theme 5. Making the Theme Fully Responsive 6. Making the Theme Socially Ready 7. Creating a Magento Widget 8. Creating a Theme Admin Panel 9. Customizing the Backend of Magento 10. Packaging and Selling the Theme Conclusions and Credits Index

Tips and tricks


There is some stuff that you must know while creating a theme. The following tips will help you in cases of extreme necessities, particularly when you are looking for a specific file to override.

Template path hint

The app/design/frontend/base/default path contains a lot of files, all divided into many folders. It's a bit hard to remember the path and name of every file. In order to find the path of a file in the base theme, we need to customize and then copy our theme; Magento comes to us with the Template Path Hints option.

This feature will help you a lot if you don't know the position of any file and will help you to speed up the theme creation.

To enable this feature, perform the following steps:

  1. In the Admin panel, navigate to System | Configuration.

  2. On the left side at the bottom in the Advanced box, click on Developer.

  3. On the left side in the Current Configuration Scope box, select the Main Website, option or your own website.

  4. Now, in the Debug box to the right, select YES to Template Path Hints.

  5. Save the configuration.

Back in the frontend, we can see each block surrounded by a red border, with the PHTML file path that generates it.

In this way, we can copy the files from the base theme and paste them to the same location of our theme.

Tip

Alternatively, you can use the Templates Hints 2 module created by Fabrizio Branca at http://www.fabrizio-branca.de/magento-advanced-template-hints-20.html.

The following screenshot shows the template path hints in action. As you can see, each block is surrounded by a red border with the path to the file that generates it:

This is an example of what the screen in this program looks like.

Disabling the WYSIWYG editor

Another useful tip is to disable the WYSIWYG text editor. This will save you a lot of time when you have to write the HTML code inside the CMS pages or blocks, and you can prevent the editor from changing the code you've written.

To disable it, navigate to System | Configuration | Content Management, as shown in the following screenshot:

Here you have three options. You can choose to leave it as Enabled by Default (the default configuration), or you can choose to disable it completely, or to disable by default. I recommend that you at least disable it completely in the development phase.

You have been reading a chapter from
Mastering Magento Theme Design
Published in: Apr 2014
Publisher:
ISBN-13: 9781783288236
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