I'm looking in to adding template support in my software and I'd like some insight from others how they would or even have implemented it. I'm talking more in the context of conceptual, not the actual MySQL structure at least directly such as field types unless someone considers that relevant to the conceptual aspects.
Here are my current notes...
Standalone might be in example a small part of the page for advertising, e.g. it's root most element is completely contained inside of that template item.
Type would be header or footer though it might be something else.
Validity is (X)HTML related, if it's not been validated it can't be used. I think I might have a second XHTML field for updates pending re-validation.
My goal is to have the template system as flexible as possible and even include the ability to have several template items be used simultaneously on a single page for modularity.
...and I'm not using third party software however I have nothing against considering good features of other people's software.