8. The Making of a Theme
Mommy, where do themes come from?
● Modules →
● Templates →
● Base theme →
● Your theme →
● Rendered page
9. Steps to Making a Theme
● Communicate with your whole team.
● Use wire frames to prove what you're saying about
how the site ought to be built.
● Build the site without a theme.
● Convert your wire frame to a grid layout.
● Build out the HTML fragments in the relevant
tpl.php files.
● Apply your theme to the site.
● Refine as necessary based on the UX.
19. Forensic Theming
● Definition: the art of investigating a Drupal page to
find out how that thing got there.
● Toolkit:
● Firebug
● Sweaver
● Devel themer
● Requirements: Plan and Build your site before you
theme.
20. Step Away from the Code
● Most common problems are so common they can
be solved with settings in the administrative
interface.
● Get to know Drupal really well and can do less
work to make your site look right.
● Use helper modules to avoid writing new code.
21. The Clues are in the Code
● Look at the class names to find out what module
made that.
● Use the body classes to make page-specific
selectors.
● Before you make another theme tpl.php file make
sure you really need to.
24. Less Yucky Markup
● European vs American theming
● Inheritance: start with a better base.
● Base theme: mothership
● Modules: Semantic Views
● D6 Modules: Semantic CCK
25.
26. Sweaver
● Pointy-clicky-non-scary CSS class selector.
● Can make minor changes to CSS for a set of styles
and save to the server.
● drupal.org/project/sweaver
27.
28. Devel / Themer
● The Cadillac of theming tools.
● Tells you which tpl.php or theme function is
responsible for that thing displaying over there.
34. theme_name.info (1 of 2)
name = D7SBE - Domicile
description = A three-column design by Design House (www.design-house.ca) and
themed by Design to Theme.
screenshot = screenshot.png
core = 7.x
engine = phptemplate
base theme = ninesixty
; Stylesheets.
stylesheets[all][] = styles.css
; To show the 960.gs grid and debug your theme's layout, delete this section.
; You will be able to remove this when http://drupal.org/node/1032486 is rolled out
stylesheets[all][] = debug.css
35. theme_name.info (2 of 2)
; Regions
regions[nav_left] = Navigation (left)
regions[feature_middle]= Feature column (middle)
regions[content] = Content column (right)
regions[copyright_footer] = Copyright notice (footer)
; Features
features[] = logo
features[] = name
features[] = favicon