Setting Variables
Example
- Setting the last date of a software update in a site variable.
MGI Tags
Steps
- Create a variable page in a text editor.
- Insert the mgiSet tag.
- Save the variable page.
- FTP the variable page to a web server running MGI.
- 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.
- Insert the beginning mgiSet tag, name 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 scope parameter, enter "Page"
or "Site". A page variable is a temporary variable that exists
only while the page is being processed. 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="Date" scope="Site">
<mgiDate>
</mgiSet>
<H3>The 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 current
date is set in the variable database. The page that is served will display
the header "The variable is set."
|