Slideshow transcript
Slide 1: Drupal 6 Theming What’s new and how it’s better
Slide 2: Are we near Theming Nirvana? Theming Nirvana is when it is considered easy for designers to create new themes, and there are many themes for random Drupal users to choose from.
Slide 3: Drupal 4.5: Theming Hell Only had .theme files and theme function overrides.
Slide 4: Drupal 4.6: Theming Purgatory Xtemplate just didn’t do it for us.
Slide 5: Drupal 4.7: Theming Limbo PHPtemplate helped, but having only page, node, block, and comment templates is weak.
Slide 6: Drupal 5: Still Theming Limbo I guess it’s not really limbo if you’re not stuck there for awhile.
Slide 7: Drupal 6 • Info files make obscure configuration obvious • 31 templates available and growing • Serious drive toward separation of logic and presentation • Better _phptemplate_variables() • Theme inheritance • Pure CSS themes • Theme engines have all this, too.
Slide 8: Info files
Slide 9: More templates • More granular control over your content. • Logic is separated from presentation. • Data has already been sanitized meaning fewer inadvertent security holes.
Slide 10: forum-topic-list.tpl.php
Slide 11: forum-topic-list.tpl.php
Slide 12: Logic
Slide 13: aggregator-item.tpl.php
Slide 14: Separation
Slide 15: phptemplate_variables()
Slide 16: Theme inheritance • A sub theme sets ‘base theme’ in info file • A sub theme gains all style sheets • A sub theme gains all templates • A sub theme gains all functions in template.php • A sub theme should never use phptemplate_* functions • Safest way to ‘tweak’ a theme and still be able to upgrade the theme
Slide 17: CSS only themes • Core page.tpl.php theme based on zen • Uses well-named classes to identify areas • A theme with just an .info file will create an ugly site but with clean XHTML that can be manipulated
Slide 18: Theme engines • Smarty, PHPTal, LOLTheme • Register an extension -- .smarty • Register a renderer – smarty_template_render() • Discover templates on behalf of the theme • Load a template.php file on behalf of the theme
Slide 19: Are we near Theming Nirvana? • Not everything templatized • Not a complete enough set of well-named classes • Not enough direction for contrib modules in how they create their HTML • Not enough direction for contrib theme authors • Poor infrastructure for finding themes on drupal.org
Slide 20: We are merely Enlightened Maybe Nirvana in Drupal 7
Slide 21: Care to contribute? • Help participate and clean up our XHTML CSS • Help create a set of well-named classes to use across Drupal • Help create templates that do not yet exist



Add a comment on Slide 1
If you have a SlideShare account, login to comment; else you can comment as a guest- Favorites & Groups
Showing 1-50 of 16 (more)