Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Drupal 6 Theming

41,273 views

Published on

An overview of the changes to theming in Drupal 6.

Published in: Technology, Business
  • Thanks merlinofchoas. I usually find it difficult to theme menus in Drupal. I found this article. http://programmingbulls.com/complete-drupal-6-menu-theming. I hope this tutorial on theming menus in drupal 6 is helpful to others too.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Drupal theming has come a long way since this presentation, and Drupal 7 will be even better. Check out http://fusiondrupalthemes.com/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • If you want to check out a cool Drupal based site visit OracleLink.com - The Oracle Community Network

    http://www.oraclelink.com



    Built by CTISN
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • you should mention drupal 6 in y our title.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • hey merlinofchaos can u please explain how can i overwrite forums.tpl.php and all the other templates in forums folder in drupal6...

    because this is not mentioned anywhere its becoming very confusing for me..
    Thanks in advance.<br /><br/>
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Drupal 6 Theming

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

×