I've written a class that will take this, or any template file, and parse it with user-defined values stored in a Dictionary object. This example only loads one page and doesn't address the needs of most websites. However, for large multiple page sites you could put a default set of tags into an include file that is loaded on every page, then you need only specify what template file to load and add any page specific tags before using the GenerateHTML method. I won't get into it in this article as the file itself is documented. Simply change a template file that controls the layout and style specific HTML code is much easier than traversing multiple files of spaghetti code line by line.
Error handling needs to be added.
The class is limited to returning a string or variable for any tag. In a future article I will expand upon the class and it's capabilities and show how this can be used in the creation of a portal site. Copyright 2001 INT Media Group, Incorporated. All Rights Reserved.