MyVars Extension Installation

System Requirements

Installation Instructions

  1. Log into the Admin section of your SkyBlueCanvas site at www.yoursite.com/admin.php.
  2. Navigate to Admin > Collections > Installer.

About MyVars

The new MyVars extension allows you to create custom search variables/tokens that will be replaced with the values you specify when your web page is rendered in the browser. This feature can be helpful when you want to be able to easily change bits of informatin such as phone numbers, emails, web page URLs or image paths. You set the value once, and it is displayed anywhere in your site you choose. If the value changes, you only make the change in one place.

How It Works

Let's say you have your phone number littered throughout your web site. If your phone number ever changes, you would normally have to find and change every instance of the phone number on your site. With the MyVars extension and plugin, you can set your phone number in one place, and use a simple string replacement token to have the phone number automatically update immediately throughout your site.

MyVars has three possible variable types:

  1. Variables

    Variables are single word tokens that you can use anywhere in your page text, template HTML or even field inputs such as page titles, menu text or link text. The tokens are formatted as [[search_value]]. For instance, if you create a phone_number variable, you simply insert the [[phone_number]] token anywhere on your site, and the MyVars Plugin will automatically replace the token with the value you enter in the MyVars Manager.

    Example:

    Let's say you create a variable with the search value phone_number and give it the replacement value (555) 555-1234.

    In your page text, you enter:

    For more information, please contact us at [[phone_number]].

    Your page will appear as:

    For more information, please contact us at (555) 555-1234.

  2. Strings

    Strings are any string of text, of any length that you want to replace throughout your site. For instance, let's say the name of your company changes from Acme Industries, LLC to Acme Global Industries, Inc. Rather than search throughout your entire site for every instance of the old name, you can create a string search value in MyVars Managers where the old name is the name of the variable, and the new name is the Replacement Values. When your pages are rendered, the old name will be automatically replaced with the new value.

    Example:

    Let's say you create a string search value Acme Industries, LLC and specify the replacement value Acme Global Industries, Inc..

    Your original page text contains:

    Welcome to Acme Industries, LLC....

    Your page will appear as:

    Welcome to Acme Global Industries, Inc.....

  3. Regular Expressions (Advanced Users)

    Regular Expressions is a pattern matching language to allow you to match patterns or letters and/or numbers. MyVars allows you to specify a Regular Expression as a variable name to be replaced with the value you choose. For instance, if you want to add an area code to all instances of your phone number on your web site, you can specify /[0-9]{3}-[0-9]{4}/ as the search value, enter (555) $0 as the replacement value, and MyVars will automatically add the area code to each matching phone number.

    Example:

    Let's say you create a Regular Expression search value /[0-9]{3}-[0-9]{4}/ and give it the replacement value +1 (555) $0.

    Your original page text contains:

    Please contact us today at 555-1234....

    Your page will appear as:

    Please contact us today at +1 (555) 555-1234....