September 2008

Your Site’s Three Tiers: Content, presentation, theming!

Most people would consider CMS-based site development as having two key layers, or tiers—content and presentation. Your content is your data, data relationships, and raw assets, while your presentation is your design, XHTML, CSS, and Javascript. These two tiers are stitched together to create a template and themed site.

We have found, though, that this perfunctory approach to theming misses out on some very powerful benefits.

Drupal, our usual platform of choice, inherently provides tools and conventions dedicated to theming. These tools inspired the realization that theming is most powerful when treated as a critical process separate from and as important as the processes for creating content and presentation.

In this approach, theming involves more than combining the content and presentation. The three-tier approach adds a “theming” tier to content and presentation. Just as presentation and content have dedicated roles associated with them (designers and front-end developers for presentation and back-end developers for content), the theming approach we advocate requires a themer role for successful execution.

The themer not only joins together the content and presentation, but also to oversee the establishment, enforcement, and implementation of some important rules.

Rule #1: Separation of content and presentation

Rule #2: Define and use globals

Rule #3: Use a cascading hierarchy

Tags:

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <hr> <blockquote> <h3> <h4> <h5> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <pre>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.
Stay Informed

Sign up now for the Treehouse Newsletter.