Page templates are like blueprints: you design the page's structure, add in any design elements you want, and then every time you want a replica, you just click the template. Viol, a pristine copy awaits you, to which you can then add any additional content you like. If your site has, say, separate pages for the 28 kinds of emu vests you're selling, templates can be a great timesaver: just create one emuvest template, and then you can quickly fill in the details on each new page you create from the template.
Templates come in two varieties: static and dynamic. Static templates, which you'll learn about in this section, work like a photo copier: you can create as many copies as you like, but once a copy has been made, you can only change it by modifying the copy. For instance, if you've generated your 28 emu pages, and then you decide you want to include a different color for the heading that's on each page, you have to change each and every page separately. Dynamic templates, which you'll learn about in the next section, let you apply changes to all the pages that use your template, even after they've been generated.
Creating a Template
To create your own static page template:
-
Create the page.
Create the page as you would any Web page. Add any elements like tables, pictures, and text that you want every page created from the template to have.
-
Name the template.
Select File » Properties. On the General tab, enter a name within the Title field. You'll use this name to select the template in the future.
-
Save the page as a template.
Select File » Save As. Within the "Save as type" drop-down menu at the bottom of the dialog box, select FrontPage Template (*.tem). FrontPage automatically saves this with other application files in a folder called Pages. Don't change this setting, or your template won't be available in the templates list. Click Save and a Save As Template dialog box appears. Verify the name of your template, and enter a description, if you want (see Figure 11-14).
Figure 11-14. Once you create a template, a new My Templates tab appears within the Page Templates dialog box. Your template description appears on the right side along with a page preview.
FrontPage saves your template on your computer's C:\ drive in a FrontPage program directory outside your Web site. Of course, this means that you're the only one who can use it. If you want to grant access to others working on your site, then (once you get to the Save As Template dialog box) turn on the "Save Template in Current Web site" checkbox. This way, FrontPage saves the template within the site's directory, where your colleagues can find it.
Editing a Template
Modifying a template is pretty easy: create a new page using the template and make the changes you want to show up in the template. Then, save the file, using Save As (File » Save As), just as you did when you first created the template. In the Name field, enter the exact name of the old template. If you turned on the "Save Template in Current Web site" checkbox the first time you created the template, turn it on again. When you click OK in the Save As Template dialog box, FrontPage asks you if you're sure you want to replace the existing template file. Click Yes.
Remember, modifications to a static template don't affect any pages already created with the template.
Creating Pages with a Template
Any FrontPage template you create appears with the other FrontPage templates. Select File » New and then, in the New task pane, click "More page templates." Open the My Templates tab, and then double-click the template to create a page.