© 2011 delmar, cengage learning chapter 12 creating and using templates
TRANSCRIPT
© 2011 Delmar, Cengage Learning
Chapter 12
Creating and Using Templates
© 2011 Delmar Cengage Learning
1. Create templates with editable regions
2. Use templates to create pages
3. Use templates to update a site
4. Use advanced template options
Chapter 12 Lessons
© 2011 Delmar Cengage Learning
• A template is a special kind of page that contains both locked regions and other types of regions that cannot be modified by authors.
• Locked regions are areas on the page that cannot be modified by page authors.
Creating and Using Templates
© 2011 Delmar Cengage Learning
• An optional region is an area in the template that users can choose to show or hide.
• An editable region is an area where template users can add or change content.
Creating and Using Templates
© 2011 Delmar Cengage Learning
Tools You’ll Use
Creating and Using Templates
© 2011 Delmar Cengage Learning
• Templates are saved with a .dwt extension.
• When you save a template, by default, the content on the page is locked.
Creating Templates with Editable Regions
© 2011 Delmar Cengage Learning
• An optional region’s visibility is controlled by the conditional statement if.
• If you want to give users the ability to show or hide page elements, then you can define the element as an editable optional region.
Creating Templates with Editable Regions
© 2011 Delmar Cengage Learning
activities_pages template with editable region added
Creating Templates with Editable Regions
Editable region label
Selected editable region is marked by blue outline
Templates list arrow
© 2011 Delmar Cengage Learning
• When you create a template, you save time and ensure consistency in your web pages.
• When your mouse pointer appears in the shape of a circle with a line cutting through it, you are positioned over a locked region.
Use Templates to Create Pages
© 2011 Delmar Cengage Learning
Use Templates to Create Pages
Working with a template-based page
Pointer positioned over a locked region
© 2011 Delmar Cengage Learning
• When you add a link to a page that is based on a template, you must use document-relative links.
• The path to a link goes from the template file to the linked page.
Use Templates to Create Pages
© 2011 Delmar Cengage Learning
• You can attach a template to an existing page that you have already created.
• Before you attach the page, delete any elements on the page that also appear on the template.
Use Templates to Create Pages
© 2011 Delmar Cengage Learning
• You should update a website frequently to keep the content fresh and timely.
• You can make changes to a template in the Assets panel or the Files panel.
Use Templates to update a Site
© 2011 Delmar Cengage Learning
Use Templates to update a Site
Update Template Files dialog box
Any change that you make to a template is applied to all nested templates and the pages that are based on the template
Files based on activities_pages template
© 2011 Delmar Cengage Learning
• If your template will be used by many people, you should include several optional regions in it so they can pick and choose form content element.
• Nested templates are those that are based on another template.
Use Advanced Template Options
© 2011 Delmar Cengage Learning
Use Advanced Template Options
The Editable Tag Attributes dialog box can be used to specify that certain attributes of locked regions be editable
Editable Tag Attributes dialog box