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! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
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
 J Miguel J Miguel
Author Profile Icon J Miguel
J Miguel
Richard Carter Richard Carter
Author Profile Icon Richard Carter
Richard Carter
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Magento 2 Theme Design - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
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

Custom Variables


Custom Variables are pieces of code that have specific values, like a programming variable. By creating a Custom Variable, you can apply it to multiple areas on your site. An example of Custom Variable structure is {{config path="web/unsecure/base_url"}}. This variable shows the URL of the store.

Now let's create a Custom Variable to see how it works:

  1. Open your favorite browser and access the admin area, http://localhost/packt/admin_packt.

  2. Navigate to System | Custom Variables.

  3. Click on the Add New Variable button.

  4. In the Variable Code field, enter the variable in lowercase and with no spaces, for example, dev_name.

  5. Enter Variable Name, which explains the variable's purpose.

  6. Enter the Variable HTML Value and Variable Plain Value of the Custom Variable and save it.

Now we have a custom variable that stores the developer's name. Let's use this variable inside the CMS About Us page:

  1. In the admin area, navigate to Content | Pages.

  2. Click to edit the About Us item.

  3. Click on the Content...

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 $15.99/month. Cancel anytime
Visually different images