I have a question regarding template code management.
For a website , I would need 5-10 top-level templates that would have a very different structure , let’s say some will have 3 columns , some will have 2/4 etc.
I was thinking of the most efficient way to organize the template code to be able to maintain it easily and came up with a structure based on chunks , like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
{{head}}
{{body}}
</html>
head:
<head>
{{content-type}}
{{metaDescription}}
{{metaKeyworkds}}
{{externalJS}}
{{externalCSS}}
{{title}}
</head>
content-type:
<meta http-equiv="content-type" content="{{media-type}}; {{charset}}" />
...etc. I have around 20 chunks for a template.The best thing about this aproach, is that I could reuse some parts in other templates , parts like content-type ( text/html ), encoding , entire columns , footers etc , but I was wondering what would be the overhead of doing this , after all , I would have chunks 3-4 levels deep from the main chunk .How much speed do I sacrifice by doing this and what is the recommended aproach ?
Thank you !