This extension will take a Recordset and create a set of HTML files using the records to populate a self-made template. Also it will create an index.htm file with these files, with a Table of Contents and hyperlinks to all the pages created.
A use for this extension is to create a set of static html files when you have a lot of data in a database and want a set of page for a CD or other place where an Application Server is not an option.
First thing you need to do is create your template page. Where you want the dynamic data to appear you need to add a 'token' onto the page for the extension to replace it with the relevant data. The token is identified as the name of the Field from the Recordset that you want to retrieve the data surrounded by '@' symbols. ie @myField@
An example would be, if you had the following columns in a DB table:
You could create a HTML page as follows:
<meta http-equiv="Content-Type" content="text/html; charset="iso"-8859-1">
<body bgcolor="#FFFFFF" text="#000000">
<p><img src="@Image@"> </p>
Save the template on your web server.
Create an ASP page containing the Recordset that contains all of the records that you want to create static HTML pages for. Apply the T3_DB to HTML Server Behaviour, where you will need to supply the following information:
Template Name: Enter path/file details to the template file you created
Recordset: Choose the recordset that contains the data you want to place on the HTML files.
Destination Folder: Select the folder where you want to place the set of created HTML files.
OutputFileName: Choose the field that you want to use to create the unique name for each HTML file.
Save the file, and load into your browser..........
You will need to ensure that any images you have used in you template are also copied to the relevant place so that the image links are live in the destination folder.
Should there be enough interest, I may modify the code in future releases to allow Repeat Regions etc. If you have any suggestions as to how to better implement this code, please contact me.