Slideshare.net (beta)

 
Post: 
Myspace Hi5 Friendster Xanga LiveJournal Facebook Blogger Tagged Typepad Freewebs BlackPlanet gigya icons



All comments

Add a comment on Slide 1

If you have a SlideShare account, login to comment; else you can comment as a guest


Showing 1-50 of 19 (more)

Drupal 6 Theming

From merlinofchaos, 10 months ago

An overview of the changes to theming in Drupal 6.

11499 views  |  3 comments  |  18 favorites  |  302 downloads  |  9 embeds (Stats)
 

Tags

drupal drupalconbarcelona2007 theming themes drupal 6 merlinofchaos drupal6 themeing php 6.0

more

 
 

Groups/Events

 
 

Privacy InfoNew!

This slideshow is Public

 
Embed in your blog
Embed (wordpress.com)
custom

Slideshow Statistics
Total Views: 11499
on Slideshare: 11316
from embeds: 183* * Views from embeds since 21 Aug, 07

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