The mgiGuestBook Tag

Tag Behavior

Use the mgiGuestbook tag to display formatted form submissions at a designated location on a page.


Tag Syntax

The mgiGuestbook tag has a beginning tag with one required parameter and no optional parameters, a body, and an ending tag. The tag form is:

<mgiGuestbook fileLocation="File Path">
MGI Tags and Text
</mgiGuestbook>

The form of the guestbook insertion marker is:

<!-- Guestbook Insertion Marker -->

Required Parameters:

  • fileLocation - The fileLocation is the relative path to the file containing the Guestbook Insertion Marker (i.e., where the guestbook entry is written.)

Optional Parameters:

  • None.

Guestbook Insertion Marker:

  • The guestbook insertion marker is placed in a separate file at the location where each guestbook entry should be written. Guestbook entries are written at the beginning of the insertion marker such that the most recent entries appear at the top of the list.


Example Usage and Output

<mgiGuestbook fileLocation="GuestbookLog.html">
<table width="450" border="1">
<tr>
<td>
<P><mgiPostArgument name="name"> wrote to us and said:</P>
<P><font color="#006600">
<mgiPostArgument name="comments"></font></P>
<P><mgiPostArgument name="name"> can be reached at
<B><mgiPostArgument name="email"></B>
</td></tr>
</table>
</mgiGuestbook>

In this example, guestbook entries are written to the GuestbookLog.html file and each entry will appear in the following format at the location of the guestbook insertion marker:

John Doe wrote to us and said:

I really like your guestbook.

John Doe can be reached at doe@someplace.com

When the next entry is submitted, it will appear above the previous entry:

Sarah Smith wrote to us and said:

I think your guestbook is great, too!

Sarah Smith can be reached at ssmith@domain.com

John Doe wrote to us and said:

I really like your guestbook.

John Doe can be reached at doe@someplace.com


Suggested Usage

  • Guestbooks
  • Appending Information to a File


[Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]


[MGI Guides Main Menu] [User Guide Main Menu]