The mgiFileInclude Tag

Tag Behavior

The mgiFileInclude tag inserts the contents of a file at the location of the tag.


Tag Syntax

The mgiFileInclude tag has one required parameter and one optional parameter. The tag form is:

<mgiFileInclude fileLocation="File Path" verifyFileExistence="Yes/No">

Required Parameters:

  • fileLocation="File Path" where "File Path" is the relative path to the file that you wish to include at the location of the tag.

Optional Parameters:

  • verifyFileExistence="Yes" or "No" where "Yes" indicates that the file to be included must exist and an error will be displayed if it does not exist, and "No" indicates that the file to be included is not required to exist and a blank string is displayed if it does not exist. The default is "No".


Example Usage and Output

<mgiFileInclude fileLocation="logo.txt">

In this example, the mgiFileInclude tag is used to insert a company logo and slogan on every page of a web site. The logo.txt file consists only of the following (i.e. since this file is being included on an HTML page, there is no need to have HTML, HEAD, and BODY tags):

<P ALIGN=CENTER><IMG SRC="logo.gif" WIDTH="475" HEIGHT="45"
ALIGN="BOTTOM" ALT="Example Company"></P>
<H1 ALIGN=CENTER>Buy Our Stuff!</H1>


Suggested Usage

  • Site Navigation
  • Often Updated Information (version numbers, prices)
  • Database (large text files, etc.)


[Return to the Referencing MGI Menu]


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