Building Pages Based on a Template


The next step in creating a site that makes use of templates is to create the actual pages that are based on your original template.

In this exercise, you will create new pages that use the teacher template you created in the previous exercises of this lesson. These pages will inherit the contents of that original template. The only portions of the page you can change in these new pages are those parts you defined as editable in the template.

The graphics you need for building the pages are located in the Lesson_13_Templates/Images folder.

1.

Choose File > New and select the Templates tab in the New Document dialog box.

The New Document dialog box opens. In the Templates portion of the box, a list of the sites you defined and a list of all the templates you created for the chosen site appear.

2.

Choose teacher from the list of templates for the Yoga Sangha site, leave the Update page when template changes box checked, and then click Create.

A new page is created from the template. Although this document displays the inherited content, it still needs to be saved.

3.

Save the file as Katchie.html in the Lesson_13_Templates/Teachers folder. Change the title of the page to Yoga Sangha: Teachers: Katchie Ananda.

In the new page, you see the highlight color of the locked regions (the default color is pale yellow) outlining the page. You also see the template name on a tab of the same color at the upper-right corner of the Document window.

Note

Dreamweaver automatically creates an editable region named doctitle around the title of the document so that you can change the name of all pages created from the template.

The pointer changes to a circle with a line through it when you roll over it or try to click any of the locked regions, which indicates that those areas are not editable.

4.

Replace the teacher's full name place-holder text with Katchie Ananda.

The placeholder header text is now replaced with real content in this template-based document.

5.

Open the katchie.txt file from Lesson_13_Templates/Text. Select and copy all the text and paste it over the placeholder text for the teacher bio.

The text and image appears within an outlined border. The border color is the color of the editable regions. A tab at the upper-left corner of the region displays the name of the region.

Note

Formatting text sometimes causes the table to expand. If you change to a style that uses smaller sized text, you won't be able to get the table to shrink back to the proper size by clicking outside the table, as you would do in a regular document. Because this document is based on a template, you have to close and reopen the file for tables to adjust to the proper size in regard to their contents. You won't be able to change the size of the text in this document, unless you create a new style because the internal style sheet that defines the text is not editable.

6.

Select the image place-holder and use the Property inspector to change the Src to the Katchie_sm.jpg image in the Lesson_13_Templates/Images folder.

Your page should now look like the following figure.

You can save the Katchie.html file.

7.

Repeat steps 1 through 6 to create two more template-based files, saving them as Hillman.html and Lyon.html in Lesson_13_Templates/Teachers. Replace the placeholder text with the text from the hillman.txt and lyon.txt files in the Text folder, and replace the placeholder image with the jayne.jpg and darcy.jpg images from the Images folder on the respective pages.

Tip

Clicking the More option in the Create New Column on the Start Page is a quick way to open the New Document dialog box.


The title for the Jayne Hillman document should be Yoga Sangha Teacher: Jayne Hillman.

The title for the Darcy Lyon document should be Yoga Sangha Teacher: Darcy Lyon.

You have now created three pages from the teacher template. You can close the Hillman.html and Lyon.html files. Leave the Katchie.html file open for the next exercise.




Macromedia Dreamweaver 8(c) Training from the Source
Macromedia Dreamweaver 8: Training from the Source
ISBN: 0321336267
EAN: 2147483647
Year: 2006
Pages: 326

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net