Displaying Variables

Example

Displaying the last software update from a site variable on the software news page.

MGI Tags

  • mgiGet

Steps

  1. Open the news page in a text editor.
  2. Insert the mgiGet tag.
  3. Save the news page.
  4. FTP the news page to a web server running MGI.
  5. View the news page.


Step 1: Open the news page in a text editor.

Open the news page in a text editing program that allows you to view and modify HTML.

Step 2: Insert the mgiGet tag.

Insert your cursor in the HTML where you want the date to appear. Enter the mgiGet tag, name parameter, and scope parameter. In the name parameter, enter the name of the variable you want to display (e.g., "date"). In the scope parameter, enter the scope of the variable as it was set. Enter "Page" for variables set as temporary page variables. Enter "Site" for variables set as database-driven site variables.
<mgiGet name="Date" scope="Site">

Step 3: Save the news page.

Save the changes you have made to the news page.

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

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

Step 5: View the news page.

Access the news page in a browser. At the location of the mgiGet tag the value of the date variable is displayed.


[Return to the Using Variables Menu]


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