Name: global-variables.js

Object: File

Attributes(s): Static File Name, Custom File

Live: /script/shared/global-variables/global-variables.min.js

Summary: The global variables file is the script that contains all of the variables in scope to the entire website, or everything after the page anchor.js reference. You can access global-variables.js from template.js as well as a template.js referenced layout.js, too.

More Information

This file is just variables, and it's not a class.

The trick to this file is maintaining all of your cookies as global variables. By doing this you will 1. create a manifest of variables (so it's much easier to see/keep track of it all) and 2. be able to extend the expiration date. To learn more, check out cookie.js.

Advanced Jump-start

5. All Of The Code In One Snippet

1. Standard Values

The following snippet contains variables commonly used. (Nothing to do with cookies.)

G_PagePath for this page would be /project/shared/script/shared/global-variables/global-variables-ext-js even if it had /index.html or just a slash at the end of the path.

Cookie Setup

2. Array Declarations

3. Variable Assignments

4. Array Assignments

5. All Of The Code In One Snippet