The document discusses Drupal themes and templates. It explains that themes define regions, stylesheets, and scripts in their .info file. Themes can have sub-themes and are built upon core modules and contrib modules. The document outlines how template files, preprocess functions, and theme override functions work. It also lists some popular community and commercial themes as well as modules that help with theming.
2. TEMPLATE LAYER
TEMA Tema .tpl.php CSS jQuery
.info
.tpl.php
template.php
PHPTemplate Engine (Layouts e estilos base)
SUB-TEMA
TEMAS BASE
Módulos contrib (Views, CCK, Calendar, etc...)
SISTEMAS
AVANÇADOS
Módulos do núcleo (Blog, Forum, etc...)
Núcleo
Drupal
Oficina Drupal - IST
8 de Maio 2010
3. TEMPLATE LAYER
TEMA nomedotema.info * Define regiões para os módulos
Define folhas de estilo e scripts javascript
.info
.tpl.php style.css
template.php script.js
name = Garland
SUB-TEMA description = Tableless, recolorable, multi-
page.tpl.php
column, fluid width theme (default).
node.tpl.php
TEMAS BASE version = VERSION
block.tpl.php
core = 6.x
SISTEMAS
engine = phptemplate
AVANÇADOS template.php
regions[left] = Left sidebar
regions[right] = Right sidebar
logo.png
regions[content] = Content
screenshot.png regions[header] = Header
regions[footer] = Footer
images stylesheets[all][] = style.css
..... stylesheets[print][] = print.css
scripts[] = myscript.js
Oficina Drupal - IST
8 de Maio 2010
4. TEMPLATE LAYER
LOGO
TEMA nomedotema.info *
.info
.tpl.php style.css
template.php script.js
SUB-TEMA
page.tpl.php
node.tpl.php
TEMAS BASE
block.tpl.php
SISTEMAS
AVANÇADOS template.php
logo.png
screenshot.png
images
.....
Oficina Drupal - IST
8 de Maio 2010
5. TEMPLATE LAYER
TEMA nomedotema.info * Preprocessors
.info
.tpl.php style.css
Criar ou preparar variavéis para serem usadas
no template
template.php script.js
SUB-TEMA phptemplate_preprocess_xyz
page.tpl.php
node.tpl.php
TEMAS BASE wonderful_preprocess_xyz
block.tpl.php
SISTEMAS
AVANÇADOS template.php
Theme functions override
logo.png
screenshot.png Alterar funções de apresentação que módulos
tenham definido
images
function theme_xyz( $a, $b, $c) {
.....
function nomedotema_xyz( $a, $b, $c) {
Oficina Drupal - IST
8 de Maio 2010
6. TEMPLATE LAYER
Tema Sub-Tema
TEMA nomedotema.info * nomedosubtema.info *
.info style.css style.css
.tpl.php script.js
node.tpl.php
template.php page.tpl.php
node.tpl.php logo.png
block.tpl.php screenshot.png
SUB-TEMA
template.php
TEMAS BASE logo.png
screenshot.png
SISTEMAS
AVANÇADOS
Oficina Drupal - IST
8 de Maio 2010
7. TEMPLATE LAYER
Tema Sub-Tema
TEMA nomedotema.info * nomedosubtema.info *
.info style.css style.css
.tpl.php script.js
node.tpl.php
template.php page.tpl.php
node.tpl.php logo.png
block.tpl.php screenshot.png
SUB-TEMA
template.php
TEMAS BASE logo.png
Sub-Tema 2
screenshot.png nomedosubtema2.info *
SISTEMAS
style.css
AVANÇADOS
logo.png
screenshot.png
Oficina Drupal - IST
8 de Maio 2010
8. TEMPLATE LAYER
Tema Sub-Tema
TEMA nomedotema.info * nomedosubtema.info *
.info style.css style.css
.tpl.php script.js
node.tpl.php
template.php page.tpl.php
node.tpl.php logo.png
block.tpl.php screenshot.png
SUB-TEMA
template.php
TEMAS BASE logo.png
Sub-Tema 2
screenshot.png nomedosubtema2.info *
SISTEMAS
style.css
AVANÇADOS
logo.png
screenshot.png
Sub-Tema 2a
nomedosubtema2a.info *
style.css
page.tpl.php
logo.png
screenshot.png
Oficina Drupal - IST
8 de Maio 2010
9. TEMPLATE LAYER
Community Support
Zen
TEMA http://drupal.org/project/zen
.info
.tpl.php Ninesixty
http://drupal.org/project/ninesixty
template.php
Genesis
SUB-TEMA http://drupal.org/project/genesis
TEMAS BASE
SISTEMAS Commercial Support
AVANÇADOS
Fusion + Skinr
http://drupal.org/project/fusion
http://drupal.org/project/skinr
AdaptativeTheme
http://drupal.org/project/adaptivetheme
Oficina Drupal - IST
8 de Maio 2010
10. TEMPLATE LAYER
Community Support
Zen
TEMA http://drupal.org/project/zen
.info
.tpl.php Ninesixty
http://drupal.org/project/ninesixty
template.php
Genesis
SUB-TEMA http://drupal.org/project/genesis
TEMAS BASE
SISTEMAS Commercial Support
AVANÇADOS
Fusion + Skinr Acquia Prosper
http://drupal.org/project/fusion Acquia Marina
http://drupal.org/project/skinr Acquia Slate
Abstract
Celadon
Light Fantastic
AdaptativeTheme AT Mobile
http://drupal.org/project/adaptivetheme AT Koda
AT Panels Everywhere
Oficina Drupal - IST
8 de Maio 2010
11. TEMPLATE LAYER
Módulos de ajuda
Semantic Views
TEMA http://drupal.org/project/semanticviews
.info
Block Class
.tpl.php http://drupal.org/project/block_class
template.php
Menu Class
http://drupal.org/project/menuclass
SUB-TEMA
..........
TEMAS BASE Módulos complexos
Context
SISTEMAS http://drupal.org/project/context
AVANÇADOS Spaces
http://drupal.org/project/spaces
Display Suite
http://drupal.org/project/ds
Node Displays
http://drupal.org/project/nd
User Displays
http://drupal.org/project/ud
.... Displays
Panels
http://drupal.org/project/panels
Panels Everywhere
http://drupal.org/project/panels_everywhere
Oficina Drupal - IST
8 de Maio 2010
12. TEMPLATE LAYER
TEMA
.info
.tpl.php
template.php
SUB-TEMA
TEMAS BASE
Obrigado!
João Belchior (Jolidog)
SISTEMAS Designer | Themer
AVANÇADOS
Oficina Drupal - IST
8 de Maio 2010