Chapter 9. Using Template Parameters
What You Will LearnIn this lesson, you will:Make an attribute editableDelve into template expressionsControl table row classes with template expressionsCode sequential navigation linksDisplay navigation status automatically
Approximate TimeThis lesson takes approximately one hour and 45 minutes to complete.Lesson FilesMedia File:LessonFiles/Lesson_09/css/bg_lessons.cssStarting Files:LessonFiles/Lesson_09/css/bg_ct.cssLessonFiles/Lesson_09/Templates/dean_letter_v2.dwtLessonFiles/Lesson_09/Templates/life_lessons.dwtLessonFiles/Lesson_09/Templates/press_release.dwtCompleted Files:FinalFiles/Lesson_09/css/bg_ct.cssFinalFiles/Lesson_09/Templates/dean_letter_v2.dwtFinalFiles/Lesson_09/Templates/life_lessons.dwtFinalFiles/Lesson_09/Templates/press_release.dwtIf you completed the Lesson 8 exercises that covered optional regions, you already saw template parameters in action. When a Macromedia Contribute or Dreamweaver user accesses the Template Properties dialog box and changes the display state of an optional region from false to true (or vice versa), the value changed is a template parameter. But enabling or disabling an optional region is just the tip of the iceberg when it comes to what you can do with template parameters. One of the most useful applications for template parametersdemonstrated in this chapteris to make an attribute editable within an otherwise locked tag and allow it to be changed within Contribute.Template parameters are set at design-time in either Dreamweaver or Contribute. Any given template parameter in one child page can be set to a different value in another child page, even if both child pages are derived from the same template. In fact, this facility provides template parameters with much of their inherent power. Take into account what you already know about dependent optional regions, factor in template parameters, and you have an extremely flexible templating system. For example, you could alter one template parameter and completely change all the key elements on a page, including logo, page title, and navigation.Template expressions bring automation power to your template designs, as in this class-switching repeating region.In this lesson, you'll apply template parameters and template expressions to expand the Contribute user's power, while maintaining control as the Dreamweaver designer. In addition to setting up editable attributes, you'll create a template parameter system that automatically develops navigation links for use in a multipage tutorial.