Environment Variables

A guide to the creation and implementation of environment variables

In this article, we will explore the concept of Environment Variables, how to create them, and why they are valuable. Let's dive in!

Introduction

Environment Variables are an advanced feature within the Website App that allows you to set different URL content to display on different devices while they are showing the same playlist. This feature is particularly useful when you have a shared playlist across multiple devices and want to display custom Website App content based on each device.

Why Use Environment Variables

Environment Variables offer powerful capabilities. They allow you to have a shared playlist with general media and content that needs to be shown on multiple devices. Additionally, you can include custom Website App content within the same playlist, specific to each device. This avoids the need to create additional playlists just to support custom Web App content, simplifying the organization.

For instance, let's consider a use case: A company wants to display a playlist with the same slideshow content (e.g., company notices and images) across six offices located in different cities. However, they also want to have a specific slide in the playlist that displays the website for each office's location.

Creating and Using Environment Variables

Now, let's walk through the process of creating and utilizing Environment Variables.

Create Your Environment Variable

  1. Go to the Devices tab and select a single device where you want to apply the Environment Variable.
  2. Open the "Details" tab and scroll down to the "Environment Vars" section. Click "Add".
  3. Enter a Variable Key, which will be used as a label for the Environmental Variable (avoid capital letters or spaces).
  4. Provide a Value, which should be a secure (https) URL pointing to the desired web content.

Remember, you will repeat this process for other devices, setting the unique URL for the same Variable Key.

Add the Variable to Your Website App

  1. Navigate to your Playlist and create a new Website App. You can also create the Website App from the Apps section if you prefer organizing it into a specific app folder.
  2. Under Properties, next to the "URL" field, click the drop-down menu.
  3. Select the Environmental Variable you previously created from the list. It will automatically populate the URL field.

Step 3: Apply Variable Rules to Different Devices

  1. Go back to the Devices page and select another device where you want to apply the Environment Variable.
  2. When adding an Environment Variable, select the existing Variable Key and specify the unique URL (Variable) you want the Website App to display on that device.

Don't forget to apply this to all devices displaying the Website App with the Variable Key set as the URL.

Congratulations! You have now created and applied your first Environment Variable. Remember, when an Environmental Variable is applied, the web content will not be displayed in the page preview. To test, view the URL content on the actual device.

By utilizing Environment Variables in the Website App, you can easily customize the URLs displayed on different devices within the same playlist. It's a straightforward and efficient way to personalize content based on each device.