Splash Template Variables

Sometimes you need more control that a whole section of HTML. You need to be able to replace an element of javascript or HTML - for this you need to create a Splash Template Variables.

There are a number of ways of creating variables in Splash markup: - Titles ending in "Variable" - Titles ending in "Menu" - Images with Splash Image Comments

# Why would you do this?

A good example of needing a variable is if we need to set a background image in a div.

Below we want to set the contents of the variable "Slide_3_Background" in order to replace the following markup:

in a Splash Template that includes some HTML like the following:

<div class="slidebg slide-zoom bg-dark-50" style= "background-image:url(Slide_3_Background)"/>

# Titles ending in "Variable"

So to set a variable rather than to replace a comment section you could use a title like this:

# Slide_3_Background assets/images/Salvage-Supperclub-2-800x469.jpg

# Titles ending in "Menu"