I've been going back and forth on this a bit, but I think I have a good sense of how to structure the tpl-based page-maker engine. Here are the key aspects:
UI elements common to multiple pages (like the left navigation and top status bar) should be defined in their own .tpl for easy inclusion and minimal code duplication
specific content "tiles" in the main content section should be defined in their own .tpl so that "drag-and-drop" is as easy as doing an include('tile1') in a new page.
generalizable tile formats like imageText.tpl which specifies an image + description and tile_overview.tpl which specifies an image + column of short statements set off by
should be used whenever possible to create the "specific content tiles" mentioned above.
Put another way, consider the following template-within-template hierarchy, where lower-level tpl files are used to build higher-level tpl files:
page-level tpl specifies template for building a full html page
UI element / content tile tpls specify drag-and-drop parts of a page
general element / tile tpls allow for easy creation of new modular page-parts
The code is partially there, but there is a bit more to do before it is done. Once it is, I suppose there should be a wiki page explaining this for future template-ers. That is how I think it should work, but I'd love to hear some more thoughts and opinions.
I've been going back and forth on this a bit, but I think I have a good sense of how to structure the tpl-based page-maker engine. Here are the key aspects:
include('tile1')
in a new page.imageText.tpl
which specifies an image + description andtile_overview.tpl
which specifies an image + column of short statements set off byshould be used whenever possible to create the "specific content tiles" mentioned above.
Put another way, consider the following template-within-template hierarchy, where lower-level tpl files are used to build higher-level tpl files:
The code is partially there, but there is a bit more to do before it is done. Once it is, I suppose there should be a wiki page explaining this for future template-ers. That is how I think it should work, but I'd love to hear some more thoughts and opinions.