How to add static texts in a skin
Through the Static Texts Editor you can create new static texts which can be inserted into a skin to create new fields.
Each static text is associated with a unique descriptive key, and it cannot be changed. This means that you must include the key in the skin code, and each value will be displayed in the respective language on the website.
How to access the Static Text menu
- Click on ‘settings’, located in the top bar
- Then click on the Static Text section in the left-hand menu.
- To see all the static texts available, you must select a reference language and a language to translate
How to create a static text
By default, you have a large list of predefined static texts, so you can use them freely and change their values in each available language. However, there may be cases where you need an additional static text that is not predefined. In such cases, you can create a new one.
- In the 'Create' area you can add personalized static texts. To create a new static text enter the name of the key and click on 'ADD'.
- Once the key has been created, follow the instruction of 'How to edit a static text'.
How to edit a static text
- Select the reference language in the left column and the language you want to modify in the right column.
- In the fist column on the left you can see the name of the key. This is the data you have to use when you insert a Static Text in a skin, with the structure: {{global.static-texts.custom.yourkey}}.
- Translate the static text in all the languages you consider. Remember that if you leave a language without translation, it will appear empty on the webpage for that specific language.
- Once you have completed the translation process, click on "SAVE CHANGES".
How to insert a static text into a skin
To insert a static text into a skin, you have to edit the skin code in the Front end Editor. You can find more information about how to modify a skin in the Front end Editor here.
In the Front end Editor, select the location in the html where you want to place the static text. Ensure that the key is written as follows:
{{global.static-texts.custom.yourkey}}
Where "yourkey" refers to the key name of the static text you wish to use. Remember that you can find it in the first column on the left of the translations section.
For example, if we want to insert the static text 'Calculate the itinerary' we would include the following code snippet in the HTML section of the Front end Editor
{{global.static-texts.maps.itinerary.title}}
If you have translated the static text into the different languages available on your website (in the Translations section), the text will automatically change when you change the web language.