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 Theming


Published on

Presentation for Drupal Sydney User Group meet-up in August 2008

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Drupal Theming

  1. 1. Drupal 6 overview Aimee Maree Forsstrom August 2008
  2. 2. Drupal 5 vs Drupal 6 <ul><li>Drupal 6 overview </li></ul><ul><li>Drupal 5 overview </li></ul><ul><li>Video tutorials covering installing, upgrading, new features and overview </li></ul>
  3. 3. What's New in Drupal 6 <ul><li>Improved installer </li></ul><ul><li>Localisation / internationalism </li></ul><ul><li>Available updates </li></ul><ul><li>New optional core modules added example (trigger.module) </li></ul><ul><li>New usability features added </li></ul><ul><li>PHP Filter (own module and disable by default) </li></ul><ul><li>Drop and Drag features within site build block configurations </li></ul><ul><li>Menu sections are broken down into types of menu, Navigation/ Primary Links / Secondary Links (and yes you can drag and drop : ) </li></ul>
  4. 4. What's New in Drupal 6 continued… <ul><li>Comments appear per content type, can be disabled or enabled on each content type </li></ul><ul><li>Date formatting, allows for custom formats </li></ul><ul><li>Enhanced control over teaser text (you can insert a break in your teaser text and the body (can chose to show summary in full view) </li></ul><ul><li>OpenID Log in ( just what the user always wanted  ) </li></ul><ul><li>HTML corrector filter (user forgets to add an end tag correcter filter will add the end tag) stops malformed HTML appearing in content </li></ul>
  5. 5. Changes to Performance <ul><li>Page Compression has now been added (you can chose to enable or disable) </li></ul><ul><li>Drupal page cache stores the HTML output of every page into the database (cached copy is then delivered to the end user) </li></ul><ul><li>Why is this good because there is one call to the database for page output rather then having to execute functions to create the html output (stores in compressed mode less bandwidth) </li></ul><ul><li>Block Cache is now integrated into core now you simply enable or disable (helps anonymous performance and authenticated performance) </li></ul><ul><li>Optimize not just CSS but Javascript as well, takes all the JavaScript files and turns them into one javascript file, (makes a call for one file rather then 30 files) helps not only larger enterprise site but aslso shared hosting site </li></ul><ul><li>Clear cached data (if using cache you need to clear that cache to see immediate changes) </li></ul>
  6. 6. Information Architecture <ul><li>Takes a while to get your head around the Drupal way </li></ul><ul><li>Need to create a Map of the content types your site requires and the content type you will use to represent that content in Drupal </li></ul><ul><li>Think of your time frame and budget </li></ul><ul><li>Drupal can accommodate for a complex architecture but you need the time to map the content types </li></ul>
  7. 7. Node Hierarchy Module <ul><li>Allows a Node to be a Parent Node and have Children nodes </li></ul><ul><li>Good for representing a hierarchal information architecture structure </li></ul><ul><li>Simple to install and use and provides a good way for new drupal people to create node relationships </li></ul>
  8. 8. Drupal Menu modules <ul><li>Depends on how complex your navigation system is </li></ul><ul><li>Can stick with Primary and secondary links and manipulate the look through template </li></ul><ul><li>Can create new menu blocks etc and theme separately </li></ul>
  9. 9. Drupal 6 Themes <ul><li>New drive toward the separation of logic functions and presentation features </li></ul><ul><li>All theme functions must now be registered </li></ul><ul><li>Better use of _phptemplate_variables() </li></ul><ul><li>New theme inheritance structure (more granular) </li></ul><ul><li>New template files (more template files added for greater control of regions) </li></ul><ul><li>Allows for pure CSS themes </li></ul><ul><li>Theme engines (Smarty, PHPTal, LOLTheme) </li></ul>
  10. 10. Theme inheritance basics <ul><li>A sub theme sets ‘base theme’ in info file ( Themes now have .info files ) </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>
  11. 11. 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>
  12. 12. Theme Developer Module <ul><li>Download and install Devel Module </li></ul><ul><li> </li></ul><ul><li>Theme developer (Drupal6 only) </li></ul><ul><li>Works by injecting markers into the DOM to allow theme information </li></ul><ul><li>Can pull theme function names and also function arguments ( ex arrays) </li></ul><ul><li>Hover over area of template and function names are displayed for that area </li></ul><ul><li>Open template file and amend that function to change the template </li></ul>
  13. 13. Online Resources <ul><li> (don’t underestimate) </li></ul><ul><li> (tutorial videos) </li></ul><ul><li> (tutorial videos) </li></ul><ul><li> (Devel Module) </li></ul>