This is a Developer task |
A device variable can be used to store reusable code snippets. Read more about device variables
To create or edit your own device variable:
- Go to More > Device Variables
- Select Client Variables.
- Choose an existing variable to edit it, or click New or Create New Variable to start fresh.
- Fill in the Name, Description and the Default value.
If you’re editing an OpenCities variable, you can only change the Default value. - Save when you’re done.
OpenCities client variables
Custom fonts
The value of this variable will be included in the site’s rendered HTML header. You can use this variable to reference any custom fonts you want to use within your theme.
Example:
<link href="https://fonts.googleapis.com/css?family=Merriweather:400,700|Source+Sans+Pro:300,400,600,700" rel="stylesheet">
Homepage - Do it online Icon width
Homepage Do It Online icons uploaded directly to the page are resized to match your template.
You can edit this value to change the size of the custom Do It Online icon. The format of the value should be ?w=[The width in px, without the unit]
Example:
?w=60
Custom Injection - Header
This variable is included in the HTML header along with the Custom Fonts variable. You can use this variable if any third-party plugin (e.g. Facebook Pixel, Monsido) requires you to include a bit of code in the header of your site.
Custom Injection - Footer
This variable is included just before the closing </body> tag of your site. You can use this variable to include any third-party JavaScript code (e.g. live chat or chatbot code snippet, Google Tag Manager) in the site.