HTML Output Templates |
Top Previous Next |
HTML Output Templates
As companies develop Internet and Intranet strategies, they should employ standard formatting conventions to their HTML documents. HTML-formatted reports should likewise follow these conventions, so UnForm supports the use of HTML template files.
UnForm looks for these files in the UnForm directory, each named in the parameter file "ufparam.txc" or "ufparam.txt". UnForm is distributed with a standard parameter file and standard HTML template files. To customize these for your site, copy "ufparam.txt" to "ufparam.txc", then copy the template files to new names and reference those names in the new "ufparam.txc" file.
The names to use are specified in the "[html]" section of the parameter file, and are coded as "toc=tocfilename", "page=pagefilename", "both=bothfilename", and "frame=framefilename". In each of these files, place the text "[$toc]" where the table of contents should be placed, and "[$page]" where the page table(s) need to be placed. In the case of a frame template, the two markers are used for placement of URL links to the table of contents document and the page document(s), respectively.
UnForm determines which template files are used based on the style being used for the output. If there are separate table of contents and page documents, then the tocfilename and pagefilename are both used. If the table of contents and the pages are in the same document, then the bothfilename is used. This file should contain both [$toc] and [$page] tags. If frame output is used, then the framefilename is used for the primary document, and the tocfilename and pagefilename files are used for the target documents.
In addition to the required [$toc] and [$page] tags, you can also reference other pre-defined tags: [$title], [$date], [$time], and [$status], as well as any global strings that you define in prepage{} or prejob{} code blocks. These global strings, generated by the STBL() or GBL() functions, are embedded in the document by placing the name in square brackets anywhere in the template.
One special note: If you wish to customize the date and time masks used by UnForm, set DATEMASK$ and/or TIMEMASK$ in the prejob{} code block to the desired format based on the BBx DATE() function.
The default HTML template for a page (page=filename) looks like this:
<html> <head> <title>[$title]</title> </head> <body bgcolor=#e0e0e0> <h3><center>[$title]</center></h3> <hr> [$page] <hr> <center><small> ©1997 by Synergetic Data Systems Inc.<br> All rights reserved. </small></center> </body> </html>
The default template for an independent table of contents (toc=filename) looks like this:
<html> <head> <title>[$title]</title> </head> <body bgcolor=#e0e0e0> <center> <h3>Table of Contents</h3> <strong>[$title]</strong> </center> <hr> [$toc] <p>[$status] <hr> <center><small> ©1997 by Synergetic Data Systems Inc.<br> All rights reserved. </small></center> </body> </html>
The default template for a combined style (both=filename) looks like this:
<html> <head> <title>[$title]</title> </head> <body bgcolor=#e0e0e0> <h3><center>[$title]</center></h3> <center>[$toc]</center> <hr> [$page] <hr> <center><small> Run on [$date] [$time]<p> ©1997 by Synergetic Data Systems Inc.<br> All rights reserved. </small></center> </body> </html>
The default template for a frame style (frame=filename) looks like this:
<html> <head><title>[$title]</title></head> <frameset cols="25%,*"> <frame name="toc" src="[$toc]"> <frame name="page" src="[$page]"> </frameset> </html> |