Have you ever made a great design for a page and deployed it over a number of pages, only to have to go back and change one link or image across every page?
Many people nowadays are a menu file on every page to go around this very problem. That's all fine and dandy, but what if the need arises to change something else, like adding a banner to every page, or some other design element.
To aleviate this, I started using a new technique. It involves making a design, and then splitting it at what I like to call the **POC **(point of content). You would basically copy and paste everything (in code view) from the left of the POC, and put it in a file called header.asp, then everything to the right of the POC, and call it footer.asp. This allows subsequent pages to be created in a snap.
Content Here
See how simple that looks? Now if you want to change
any aspect of the entire site... all you need to do is Change the header
or footer .asp files. Or if you want to change the design of the Entire
site all at once (without any risk of messing anything up), you just need
to back up the two files, and name your new files header and footer respectively.
Time went by, and all was going well with the new technique,
but along came a spider and freaked out little miss muffet. I had to include
something unique in the browser Title of every page... what a predicament.
To get around this issue, you can use ASP (or JSP, PHP for that
matter, I've never tried it, but I would assume it works). Any Place
that you want custom content other than the POC, simply place a variable
there as a place holder.
<title><%=Title%></title>
Once you have your variables in place, just put some ASP
before the first include file to initialize them with your values.
<%
Title = "Welcome to my page"
%>
<!--#Include file="global/header.asp"-->
Content Here
<!--#Include file="global/footer.asp"-->
This technique can be used effectively in many situations. For example, a team that has a senior developer with some junior people under him could use this by having the senior guy make the design, then the junior guys can simply code away without the senior guy worrying that they'll hose up his design.
Part II will focus on tips and tricks that can be used to ensure that this technique works well within the Ultradev environment.
Good luck