Site Themes in 2.0
Many of our users don’t realize that we offer a number of site themes for ExpressionEngine 1.x, but for the most part, you do, and none of these themes appeal to you because you either do a lot of client work with ExpressionEngine, or use it to maintain your own fully branded internet property. These themes lend themselves more to blogging, really, and again, most of you are designer superheroes and would never use a stock theme anyway. But if you had your own base set of templates and tools that you liked starting with, you could create your own themes, and it’s as easy as:
<?php
$template_matrix = array(
array('index', 'webpage'),
array('about', 'webpage'),
array('styles', 'css')
);
function index()
{
ob_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>{site_name}</title>
...
Oh, right…not so obvious or easy. The reality is that it’s a pretty slick way of defining templates, and not a lot of trouble once you understand how the PHP is disassembled to form them, but being completely honest, I recognize that not everyone “gets it” and has contributed to there not being many themes and template sets shared between users who like that type of thing.
So for 2.0, we have recognized these two key facts:
- Most ExpressionEngine users will not find stock template sets to be useful.
- Of those that do, or would like to make their own base sets, the effort required is too high.
We could take these two things and just say, “Ok, forget it, no more site themes, no template sets.” But there’s a better tool to be made from this knowledge, and here it is:

What you see above is a representation of the ExpressionEngine 1.x default site theme that comes pre-installed, made ready for 2.0. Gone is the $template_matrix and the use of PHP functions to define your templates, and the limitation of a single template group for your theme. What you see here are HTML files, CSS files, images, etc. Notice the file extensions. .group does what you think it does, it defines a template group. .html and .css you can probably already figure out; they create Webpage and Stylesheet type templates respectively. .js not shown in this theme would create Javascript templates, and .xml, well, take a guess. .feed is special, and will create an RSS / Feed type template for your RSS and Atom templates. Each of these files contains nothing more than exactly what you would enter into the template manager, using any tags you want, any markup, etc.
There are two special files in the above image, install_preferences.php and theme_preferences.php, but it’s too early to talk about what those do, as their implementation is still quite liquid. But I can share some of our ideas for what they might do, such as presetting cache options, PHP parsing settings, maybe template access privileges, etc.
We think this is really going to become useful to all users of ExpressionEngine, perhaps as one of the few that wants stock themes to choose from. Or maybe you’re a pro that likes to start each ExpressionEngine installation with a specific set of templates and tools, or even just likes reusing certain favorites like a CSS reset template, global headers, or a painstakingly designed beautiful SAEF template. Or if you’re a brand new user, installing our new default template set that trains you how to use ExpressionEngine, but alas, that’s a story for another hour.


