|
|
A custom web page could be written for each recipient, however this approach may be overwhelming for a large-scale installation. PageGate allows you to create web page template files that are used to automatically create web pages for its recipients. When you are creating a new recipient, or editing an existing recipient in PageGate's Admin program, you can use the 'WebPage' object to create or edit the web page for the current recipient (the GetWeb service must be enabled for this recipient to access this object). First, you must choose a template file from the drop-down list (template files belong in the 'templates' directory beneath the 'Web Pages Path' directory). After a template is chosen, enter the text messages to be inserted into the template file. Below is an example template file that would be used to create a web page similar to the first example above (this template is shipped with PageGate and named basic.htm).
<HTML>
<HEAD>
<TITLE>
~~~text1~~~
</TITLE>
</HEAD>
<BODY>
<H2><CENTER>~~~text2~~~</CENTER></H2>
<HR>
<FORM ACTION ="http://www.mydomain.com/cgi-bin/webgate.exe" METHOD=POST>
<CENTER>FROM</CENTER>
<CENTER>
<INPUT SIZE=40 MAXLENGTH=100 NAME="FRM"></TEXTAREA>
</CENTER>
<BR>
<CENTER>MESSAGE</CENTER>
<CENTER>
<TEXTAREA COLS=60 ROWS=5 WRAP=VIRTUAL NAME="MSG"></TEXTAREA>
</CENTER>
<BR>
<CENTER>
<INPUT TYPE=SUBMIT NAME = "SEND" VALUE = "SEND PAGE">
<INPUT TYPE=RESET VALUE = "CLEAR FORM">
</CENTER>
<INPUT TYPE=HIDDEN NAME="USER" VALUE="~~~user~~~">
</FORM>
</BODY>
</HTML>
PageGate uses text substitution with the template files to insert message text and recipient names into the template files (notice ~~~text1~~~, ~~~text2~~~, and ~~~user~~~ in the above example). If you chose this template while setting up a new recipient in PageGate, you would set the Text1 field on the recipient's web page setup screen to 'Sample Pager Web Page', and the Text2 field to 'Enter a message to be sent to a pager'. The ~~~user~~~ field will automatically replaced with the recipient's name. Up to ten text variables (~~~text1~~~ through ~~~text10~~~) can be used in the template files for automatic substitution. In addition, up to five image variables(~~~image1~~~ through ~~~image5~~~) can be used to substitute image file names into the template (these files must exist in the \images directory beneath the 'Web Pages Path' directory).
When PageGate creates a web page for a recipient, it creates a directory under the 'Web Pages Path' directory that is specified on the GetWeb's settings screen. The directory is named the same as the PageGate recipient's name. The web page is named default.htm (and copied to index.htm) and placed into the newly created directory. This structure allows for easy addressing of recipient web pages. For example if the 'Web Pages Path' was set to the root directory of the web server at 'mydomain.com', and a recipient was created with the name 'chris', you could get Chris' web page by going to www.mydomain.com/chris. If the root directory of the web server were c:\webserver\wwwroot, Chris' web page file would be c:\webserver\wwwroot\chris\default.htm (or index.htm).