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 with no spaces—for example,
dev_name
.Enter the variable name, which explains the variable purpose.
Enter the HTML and plain text values of the custom variable in the Variable HTML Value and Variable Plain Value fields 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 via...