Create a Parameter Error Checking Routine
The main reason for building template-driven sites is so that another user can amend the content themselves using Dreamweaver or Contribute without coming to you for small changes and advice - so you need to make the templates as self-explanatory as possible, to avoid having to field lots of queries on which template parameter takes which values, and ending up with just as many questions as you had before!
In this 17-page tutorial, Brad details how he went about a real-life project to intercept incorrect Template Parameter values and display a list of allowed values to prevent the Dreamweaver/Contribute content editors from causing page or Template engine issues using Template MultipleIf Conditional regions. This requires a little more front-end load time (in the sense that you have to actually build the functionality into the template) but provides the content editor with immediate feedback if they input an incorrect value. Be smart and incorporate this into your template development routine and your users will be happier for it.. and so will you!
Overview
Table of Content:
- Recommended Reading:
- FREE Template Snippets Extension
- The Template Markup
- Optional Region (Singular If)
- Markup:
- Markup Description:
- MultipleIf Conditional Region
- Markup:
- Markup Description (container):
- Markup Description (clause):
- Example of use
- An example of a real-world condition that this may be employed
- Creating the Site Definition:
- Tutorial Project
- Taking Care of the Conditions
- Testing the Conditions
- Combining the conditions
- Checking for Invalid Values
- What did you learn?
- Conclusion
Brad Halstead (www.dreamweavermx-templates.com) is a computer software engineering technologist by trade, but deviated from that dream to join the Canadian military as an air weapons systems technician where he learned all about various computerized aircraft weapons systems as well as loading the munitions. Brad has dabbled in the web in various capacities since 1989 and left the military to become a fulltime computer technician. Brad tries to play an active roll in the support forums for Dreamweaver, Contribute and Project Seven, as time permits him to. Brad is HTML 4.01 Certified, and has contributed content to Dreamweaver MX Magic and Inside Dreamweaver MX, in addition to being a technical editor for both publications. Recently, Brad co-authored Dreamweaver MX Templates and has been accepted as a Team Macromedia Member for Contribute.
He lives in London, Ontario with his cherished partner Brenda and their daughters Megan and Amanda, son Aaron, a Yorkshire Terrier, and their newest addition, a Sheltie.
See All Postings From Brad Halstead >>
Reviews
Be the first to write a review
You must me logged in to write a review.