7.1. Using page templates

Page templates are a way of saving parts of a page that you want to apply to multiple pages. For example, you might decide that you want every page in your ten-page book to have a green background and a thick white border. On page 1, you could create the green background and thick white border; then you could save the page as a page template. If you apply that page template to pages 2 through 10, all your pages will look the same.

Creating a page template

To make a page template, make changes to the page, then click the + page halo to save the page as a page template. A window will appear asking which aspects of the page you want to save as a page template:


All properties are chosen by default except for "Use as default template". Choose which you want to use; when you're sure, click Add. In the Content section of the tree, you'll see a listing of all the frames on the page; if you want to use these as part of your page template, make sure that they're checked. Note that a frame that's on a page template is the same on every page that it's used on: so if you use a page template with frames on pages 1 and 2 and make a change to the text in one of those frames on page 1, the change will also be reflected on page 2. Generally, you should only use frames as part of your page template if you want that frame to appear as background in the page.

Once you've created a page template (by clicking Add, it will appear in the page templates palette in the library tab:


This screenshot shows three different page templates. You can have as many page templates in a book as you want.

If "Use as default template" has been chosen, the page template that you just saved will be used as the default page template for newly created pages. Until you save a new default page template, newly created pages won't use a page template: they will be white with no border. You can change the default page template by saving another page template as the default page template. Be careful with this: if you mistakenly do this, you'll need to create a blank page and then save that as the default page template.

Applying a page template and adding pages

To apply a page template, go to the page to which you want to apply the page template. Go to the page templates palette in the library tab; choose the page template that you want to use, then drag the page template's name to either the page or the page's thumbnail in the page preview palette. The page that you're dragging the page template to should turn red to indicate that it's going to be changed. When you drop the page template, you'll see a dialogue box like this:


If your saved page template includes frames, you'll be asked if you want to include them when the page template is applied. The answer is yes by default; if you don't want to apply them, choose None from the frame's drop-down menu. Be careful: applying a page template may undo changes that you've made to the page. Also remember that changes made to a frame that was added as part of a page template will be carried over to every page that uses that page template.

If you're sure that you want to delete what's already on the page when you apply the page template, check the box labeled Delete unassigned elements. This will delete everything that's on the page that's not part of the page template.

You can also apply a page template by dragging page templates to add a new page. Drag a page template before the first page, after the last page, or between any two pages in the page preview palette to insert a new page.

Editing page templates

If you double-click an entry for a page template in the page template palette, you can edit the page template's setting. The page template will be opened in its own window (which looks just like a book window). Make the changes you want to make, then close the page template.

These changes will not automatically be applied to every page that uses the page template, because you might risk losing a lot of content in this way. Drag the changed page template to those pages to update them.