Form Follows File
-
Upload
adub -
Category
Technology
-
view
1.925 -
download
1
description
Transcript of Form Follows File
Form Follows File
Introduction to painlessDrupal theming
Django Beatty - Adub Drupal Solutions - http://adub.com
Top Two Drupal Theming Myths
1. Theming is difficult
2. You can't control Drupal's HTML output
Django Beatty - Adub Drupal Solutions - http://adub.com
Two ways to customise output
• Theme functions • Template files
Django Beatty - Adub Drupal Solutions - http://adub.com
Theme functions
• Slightly easier for developers • Better performance before Drupal 6
Django Beatty - Adub Drupal Solutions - http://adub.com
Template files
• Allows a page element to be overridden by a file in the theme e.g. Article, Block, List, List item
• Change output simply by creating a template file
• Consistent approach is clearer to understand and maintain
• No performance penalty
Django Beatty - Adub Drupal Solutions - http://adub.com
Contributed modules
• Not all contributed modules follow this approach • But many do!
• For those that don't, theme functions can be mapped to
template files
Django Beatty - Adub Drupal Solutions - http://adub.com
Django Beatty - Adub Drupal Solutions - http://adub.com
Getting started
• Install Devel module • Enable theme developer
Django Beatty - Adub Drupal Solutions - http://adub.com
Django Beatty - Adub Drupal Solutions - http://adub.com
Examining how an element is themed
Django Beatty - Adub Drupal Solutions - http://adub.com
Django Beatty - Adub Drupal Solutions - http://adub.com
Django Beatty - Adub Drupal Solutions - http://adub.com
Django Beatty - Adub Drupal Solutions - http://adub.com
This approach can be used throughout the site
Django Beatty - Adub Drupal Solutions - http://adub.com
Django Beatty - Adub Drupal Solutions - http://adub.com
Resources and further reading
• Devel - http://drupal.org/project/devel • Gigulate - http://drupal.org/project/gigulate
• Front End Drupal - http://frontenddrupal.com/
Django Beatty - Adub Drupal Solutions - http://adub.com