Meg Frisch, Larry Miller, Theresa Summa, Mason Wendell
What's a Theme?
Source: "About Theming" in the Drupal.org Theming Guide http://drupal.org/node/221881
- A "theme" is a collection of files that define the presentation layer or "look and feel" of a Drupal site.
Workflows and Roles
Diff'rent Strokes for Diff'rent Themers › What's a Themer?
- A Themer is someone who creates and/or customizes the user interface (UI) for a website in Drupal.
- We have different backgrounds:
- what are necessary skills?
Diff'rent Strokes for Diff'rent Themers › A typical day in the life...
- We may work with several other designers, developers, and themers on our team (a large team of 10 or more)
- We may work with only a couple other players, sharing some responsibilities (a small team of under 10)
- We may work on our own, managing and coordinating entire projects (soup to nuts)
- We may work on a contract or for another group as a freelance themer (flying solo)
Diff'rent Strokes for Diff'rent Themers › On a small team...
- accountability / responsibility
- best practices & good habits
Diff'rent Strokes for Diff'rent Themers › On a large team...
- be aware of different skill levels &
- stay involved in design and development process (if not already)
Diff'rent Strokes for Diff'rent Themers › flying solo
- account for other roles / team members
Anatomy of a theme
What's in a Theme?
- Pre-process, overrides & API functions
What's in a Theme? › The .info file
- Necessary for Drupal to "see" the theme
- name, description, version and other information
What's in a Theme? › template.php
- stores theme (override) functions
- In Drupal 6, some functions, like drupal_add_js(), can be loaded from the template.info file instead.
- In Drupal 7, some functions will only be available from the template.info file.
- function mytheme_preprocess_node()
- function mytheme_preprocess_page()
- use this when you want to simplify your workflow and create reusable parts.
What's in a Theme? › tpl.php files
- implement theme variables
- exercise caution - do not build templates of doom
What's in a Theme? › auxiliary files CSS, JS, images
- create folders in your theme directory
- e.g. /css, /js or /scripts, /img or /images
- as a general rule, you are adding or overriding not replacing
getting started, software recommendations, essential modules & resources
Themer's Toolkit › Software recommendations
- textmate (mac) / notepad++
- netbeans (cross-os compatible)
- but we're not sure it matters.
- Adobe Creative Suite or Open Source graphics program (Inkscape, Gimp)
Themer's Toolkit › Essential Modules
Themer's Toolkit › Resources
- Zen theme (drupal.org/projects/zen)
- Subthemes (drupal.org/node/225125)
- Lullabot's Theming Best Practices (lullabot.com/articles/theming-best-practices-garland-gets-a-cleanup)
- When all else fails... ASK ON IRC!
› Happy Theming! Meg Frisch Twitter: @megfrisch [email_address] Larry Miller Twitter: @ldpm [email_address] Theresa Summa Twitter: @theresaanna theresaanna.com Mason Wendell Twitter: @canarymason canarypromo.com