the complete webmaster
tutorials reviews reference
ASP
CGI
FrontPage
HTML
Java
JavaScript

Sponsored by El Scripto

Visit the Mortgage Loan Place for Home Loans and also click here to find VA Loans on our site.

Open software to automate your online business

home / articles / frontpage

Roll Your Own Web Templates with FrontPage 98

I'm sure you're familiar with using the Web Templates that come with FrontPage 98 to create new webs. The Web Templates can create anything from an empty web to a full-blown commercial web site, complete with Themes and Feedback forms, and a whole slew of ready-made FrontPage components. But did you know that you can create your own Web Templates, and even edit the existing ones? Hmmm... Could be fun! Here's how:

FrontPage Web Templates are stored in the FrtontPage client directory. Usually, this is C:\Program Files\Microsoft FrontPage\Webs. Each template is in a folder called "<Theme Name>.tem." To create a new template, you just specify the name of the template, with the ".tem" extension in a new folder in this directory. The folder will also contain the various folders and files in the web itself, so, of course, the first task is to create the web which will be used as a template. In addition, the folder will contain a "<Theme Name>.inf" file, which contains information about the web. If the template is a frameset, there will be additional information necessary, but you can read all about the additional information in the FrontPage SDK Word document if you need to go further than this. The SDK document is found in the FrontPage 98 installation CD, in the SDK folder, and is named "FPDEVKIT.doc." For now, I am going to walk you through the creation of a fairly straightforward template, probably more than you need to create your own.

To do this demonstration, I used my ASP Discussion web, a database-connective discussion web which I sell through my web site (http://www.takempis.com)  , and is structured much like the discussion area at my web site. It has several images, a few files in the root folder, and a few in the _private folder.

I began by opening Windows Explorer, location my C:\Program Files\Microsoft FrontPage\Webs folder, and creating a new folder called "discussion.tem." I then navigated to my C:\Webshare\WWWRoot\discussion folder, the folder where my Discussion web is located on my server, and copied all the files in the root folder of that web to the "discussion.tem" folder:

template1.jpg (88299 bytes)

I repeated this step, copying the images and _private folders to the "discussion.tem" folder, resulting in the folder structure you see in the left-hand pane of the image above. I made sure to go into the "discussion.tem" folder and remove all the _"vti" folders and files afterwards, leaving just the folders and files from the web.This essentiall created a "copy" of the web in the folder.

The next step was to create the "discussion.inf" file in the "discussion.tem" folder. This is done with NotePad, or any other text editor. The text of this file is duplicated below:

[info]
title=Discussion Web
description=Create an ASP discussion web, which interacts with an Access database.
[FileList]
index.htm=
listmessages.asp=
messages.asp=
reply.asp=
Getting Started.doc=
images\Blue_and_Pink70A6.gif=images/Blue_and_Pink70A6.gif
images\Green_Ball2015.gif=images/Green_Ball2015.gif
images\taklogo.jpg=images/taklogo.jpg
_private\discussion.mdb=_private/discussion.mdb
_private\footer.htm=_private/footer.htm
_private\header.htm=_private/header.htm
_private\style.htm=_private/style.htm
[MetaInfo]
companyemail=youremailaddress@yourdomain.com
companyphone=617-555-1212
companyaddress=123 Web Way, Cambridge MA 02138
companylongname=ACME Industries Inc.
companyfax=617-555-1212
companyshortname=ACME
generatedby=TAKempis Discussion Web Wizard
companywebmaster=webmaster@yourcompany.com
[TaskList]
task1=Replace Logo Image|1|Discussion Web|_private/header.htm||Replace the image on this page with your logo image
task2=Customize Home Page|1|Discussion Web|index.htm||Replace generic text with something more specific to your company
task3=Customize Footer Page|1|Discussion Web|_private/footer.htm||Edit the hyperlinks to reflect the layout you desire
task4=Customize Style Page|1|Discussion Web|_private/style.htm||Edit this page to alter the overall style of the web
task5=Set up your System DSN|1|Discussion Web|Getting Started.doc||See Getting Started.doc for instructions on setting up your System DSN
task6=Empty the database|1|Discussion Web|_private/discussion.mdb||After testing the web, remove the sample records
task7=Edit Web Settings|1|Discussion Web|||Change the default web settings to reflect your company information

Note the 4 headings, which I have shown in bold letters. Of these, the [info] is the only one which is always necessary to include. The information here is used in FrontPage Explorer to give a title and description for the template. If you have files and folders in your web, the files must be identified and located in the [FileList] section. Files in the root folder are simply identified by their name followed by the "=" sign. files in subfolders are identified by their relative file path (<folder name>\<file name>), followed by the "=" sign, and their relative virtual path in the web (<folder name>/<file name>). Whatever your default home page file name is, be sure that in the template it is named "index.htm." When you create a new web from the template, the file name will be converted to your default home page file name.

The [MetaInfo] section deals with information which is found in the Tools|Web Settings (Parameters tab) menu item of FrontPage Explorer. This can be useful when using Web Parameters with the Substitution component:

template2.jpg (81798 bytes)

As you can see from the discussion.inf text above, you assign name/value pairs to the parameters you specify.

The [TaskList] section is for creating the initial "To Do" list for the web. Each task is given the name "task<number>," followed by the "=" sign, and a definition for the task. The definition consists of six attributes separated by the pipe (|) character. These are described in the table below:

Task Attribute Description
TaskName a short phrase, typically 3 or 4 words, telling the user what to do
Priority an integer, where 1=High, 2=Medium, and 3=Low
CreatedBy the name of the template creating the task
URL the page or image the task refers to, such as news.htm or logo.gif
Cookie an additional identifier for a point within the target URL; currently limited to HTML bookmarks, specified as #bookmark
Comment a few words describing in detail what needs to be done; cannot contain any new-line characters

When an attribute has no value, just place the pipe delimter there, with nothing in between. You can see this in the example above. In every task definition, I have left out the "Cookie" aspect. And in the definition of the task for creating a System DSN, which has no file associated with it, it is also blank.

Here is a screen shot of the resulting task list:

template3.jpg (104528 bytes)

Once you've finished editing your .inf file, save it, and you're ready to go. Next time you open FrontPage Explorer, and elect to create a new FrontPage web, you'll see the web in the list of templates:

template4.jpg (84045 bytes)

And that's the end of the story! Have fun, and hey, let's be careful out there!

Author: Kevin Spencer
Date: 04/05/98

More articles about Microsoft FrontPage
More articles by Kevin Spencer
Author Biography

Open software to automate your online business
write for us about us advertise

Copyright 1997, 1998 A Big Lime. All rights reserved.

body>