Effective template system
- by Alex
I'm building a content management system, and need advice on which theming structure should I adopt. A few options (This is not a complete list):
Wordpress style:
the controller decides what template to load based on the user request, like: home page / article archive / single article page etc.
each of these templates are unrelated to other templates, and must exist within the theme
the theme developer decides if (s)he want to use inner-templates (like "sidebar", "sidebar item"), and includes them manually where (s)he thinks are needed.
Drupal style:
the controller gives control to the theme developer only to inner-templates; if they don't exist it falls back internally to some default templates (I find this very restrictive)
Funky style:
the controller only loads a "index.php" template and provides the theme developer conditional tags, which he can use to include inner-templates if (s)he wants.
Among these styles, or others what style of template system allows for fast development and a more concise design and implementation.