Overview

Styles Overview 3

***All template files are tested using modern browsers, such as Chrome and Firefox. We do not support or test using Internet Explorer.***

Today, we’re going to examine how we handle variable names here at eLB. This affects each of the template files in a style. You'll notice these variable name particularities once you get started working with our files, pretty much immediately. Let’s take a look together now.

At the end of most variable names, you'll notice an underscore and then a number. If you don't see a number, chances are you're dealing with an xAPI variable. In that case, you should see an underscore xAPI at the end. We'll talk more about that in a second.

The number corresponds to the product number associated with each file—for instance, 9427691 maps to the Jet Black Storyline 18-Tab Click to Reveal. We include that at the end of each variable to keep each instance straight when combining file. Several files may use the same variable name otherwise (NumofTabs, for instance). Since we may be using similar—or same—variable names in different, and potentially conflicting ways, we include a trailing product number to ensure no conflicts between files when combining. In most cases, it's safe to rename these variables.

Obviously, you'll want to test after making any changes, but generally, you should be free to change. One special case is the Popular Choice game. Make sure to update any variable name you change in the Javascript used to run the game; this occurs in several places; check each.

There are two primary types of variables in each of these files—those you can touch, and those you can't. Knowing which is which is simple. Anything with a preceding x is off limits. For instance, xTabCounter. If you see an x at the beginning of a variable name, hands-off. Anything else, you can modify as you like!

All of the xAPI variables are identified by a trailing _xAPI on their variable name. For instance, baseURL_xAPI. You may edit these variables as needed, but be aware that any name change you make should be addressed in the execute Javascript trigger that powers the xAPI statements in the file. Learn more about xAPI templates here.

Ok! That's it for today on variables. It's probably best at this point to go download and crack open one of these templates if you haven't already, and get tinkering. Make sure to check the library for additions and updates to styles going forward.