Setting Number Variables

Example

Setting an interest rate in a variable.

MGI Tags

  • mgiSet

Steps

  1. Create a variable page in a text editor.
  2. Insert the mgiSet tag.
  3. Save the variable page.
  4. FTP the variable page to a web server running MGI.
  5. Access the variable page.


Step 1: Create a variable page in a text editor.

Create a new page in a text editing program to set the content of the variable.

Step 2: Insert the mgiSet tag.

Only a site variable can be set as a number type. The number variable type can contain integers or decimal numbers.
 
Insert the beginning mgiSet tag, name parameter, type parameter and scope parameter and the ending mgiSet tag. In the name parameter, enter the variable name. Use a unique name for each variable. In the type parameter, enter "Number". In the scope parameter, enter "Site". A site variable is stored in a database and is available at all levels of a site. Any information between the beginning mgiSet tag and the ending mgiSet tag is the value of the variable. Enter a verification sentence that will display when the variable is set, for example "The variable is set.".
<mgiSet name="Interest" type="Number" scope="Site">
8.5
</mgiSet>

<H3>The interest variable is set.</H3>

Step 3: Save the variable page.

Save the changes you have made to the variable page.

Step 4: FTP the variable page to a web server running MGI.

Upload the variable page from your local computer to the web server using an FTP program.

Step 5: Access the variable page.

Every time the software is updated, access the variable page in a web browser from a server running MGI. When you access the page, the interest rate is set in the variable database. The page that is served will display the header "The interest variable is set."


[Return to the Using Variables Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]