Before anyone says it: yes I know that the devs have no interest in doing this.

However, I can't see a good reason why I can't do it as a custom "template" using the override system.

If I run my ideas through here, maybe someone can tell me why they're doomed to failure?

Basically, what I want to do is take each file in the default template and split it into two parts: logic and layout. The first part would generate all the data it does already, but instead of directly displaying them would pass the values to a $smarty object, and then call $smarty->display() at the end to pull in the template part.

This would mean that the granularity of the template design would be the same as the Zen templates, so this wouldn't be as flexible as I would like, but once I get that far I can probably look to improve things.

To do this i will need to:
  • Insert the Smarty libraries somewhere - what would be a good path to do this?
  • Create my own set of functions (and some Smarty plugins) to be included by the other pages (ie the library would need including once per page) - where best to put that and make sure its included?
  • Create a directory for the Smarty compiled and cached files - where best to put that?
  • Where best to put the Smaryt template files?


Alternatively tell me why it won't work and I'll avoid wasting my time :-)

PS: See smarty.php.net for those who have no idea what I'm talking about!