Code editor aliases


XS version 26.4 or later

Related articles

Infradox XS tags, functions and conditions

Building a custom header and menu

Building a custom footer

Custom pages

Adding Custom CSS

Adding Javascript to your pages

XS Widgets

Custom cookie message HTML


You can maintain a list of so called alisases that you can then use in the code that you edit with the code editor. These aliases are replaced with the values that you have defined when you save a file in the editor. The aliases can be used in all files, i.e. you custom CSS, Javascript, custom pages, headers, footers and so on.


Example 1 

Create the following alias (choose Aliases in the code editor dropdown box):

xs_mylargefont=font-family:"Open Sans";font-size:1.30em;color:black;

In the custom CSS add an element width id #someelement and then add the alias xs_mylargefont:

#someelement {

When you save the Custom CSS file, the output will be changed to:

#someelement {
     font-family:"Open Sans";font-size:1.30em;color:black;

Example 2

Create an alias for a HTML color value:


In your custom CSS you can now use:

.masthead li a {
     color: xs_linkcolor

When you save your CSS file, the output will be changed to:

.masthead li a {
     color: #cdcdcd;


The aliases are used to find and replace values in your files when you save your changes. If you change an alias, the output of your files is not automatically changed. You will have to save the files in which the alias is used again.




Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk