Custom variables
Custom variables are pieces of HTML code that contain specific values as programming variables. By creating a custom variable, you can apply it to multiple areas on your site. An example of the custom variable structure is shown here:
{{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. Perform the following steps:
- Open your favorite browser and access the admin area through
http://localhost/packt/admin_packt
. - Navigate to System | Custom Variables
- Then, click on the Add New Variable button.
- In the Variable Code field, enter the variable in lowercase ...
Get Magento 2 - Build World-Class online stores now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.