Hi there JMJimmy.
I've been a long time advocate of separating design and code as far as possible, the way I do it nowadays is basically based on three sets of files, a db and a backend.
1. "main_include" that holds all php-functions that communicate with the database, these functions return the data in two-dimensional arrays.
2. "common_include" that holds functions specific to the presentation pages, menu generators, news functions, content functions and so on. These functions call for the db-functions, process the data into what I need in the final page using as little HTML as possible. This requires the "main_include"-file.
3. The presentation pages, these are basically straight HTML pages lacking menu, content, news and so on, these parts are replaced with function-calls from the "common_include" file. If need be, I can divide the presentation pages into different includes, header, footer, menu and so on.
4. All this relies on a flexible db-design based on pages, objects and properties with values. One page can hold several objects, each object can hold several properties. Example: Page 1 has three objects, one is text, one is images and the last is template; textobject holds the properties; heading, intro, maintext. Each propertys value holds the actual content. The same way with the imagesobject, those properties can hold path, descritpion, keywords, owner and so on. The templateobjects properties can hold what presentation page to use. As it is now I also handle users and permissiongroups in the db.
Finally I've got a generic backend that are supposed to allow admin of the data and pages of the site.
This way you can change the design of the site totally in a day by changing the html-pages and css and keep all the content "as is".
That's basically how I do it.
/Dan
{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-