Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Drupal 7 Theme System
Themehttp://drupal.org/project/themes
Theme from scratch
sites/default/themes/NAME         NAME.info
name = My super themecore = 7.xengine = phptemplate
NAME.infostylesheets[all][] = css/style.css                                           all,                                ...
Webkit Inspector       FirebugIE Developers Toolbar
NAME.infoscripts[] = js/actions.jsFilejs/actions.js
Regions
Name.inforegions[sidebar] = Sidebarregions[ads_mini] = Small adsregions[ads_big] = Big ads                                ...
NAME.infosettings[main_color] = orange
theme-settings.php
theme_get_settings(VAR);
Templates
Overriding template files          copy
Special template files
node--nodeid.tpl.phpnode--type.tpl.phpnode.tpl.phpblock--module--delta.tpl.phpblock--module.tpl.phpblock--region.tpl.phppa...
Template function
theme(HOOK, ARGS[]);      image      item_list      link      links      table      username      breadcrumb      ...
Overriding template function
1. NAME_HOOK()2. sites/default/themes/NAME/HOOK.tpl.php3. theme_HOOK()
function mytheme_table($header, $rows, $args)
Preprocess functions
TEMPLATE_preprocess(&$variables, $hook)TEMPLATE_preprocess_HOOK(&$variables)
Defining your own template
HOOK_theme()
Distributing content
Subthemehttp://drupal.org/node/225125
Drupal 7 Theme System
Drupal 7 Theme System
Drupal 7 Theme System
Drupal 7 Theme System
Drupal 7 Theme System
Drupal 7 Theme System
Drupal 7 Theme System
Drupal 7 Theme System
Drupal 7 Theme System
Próxima SlideShare
Cargando en…5
×

Drupal 7 Theme System

5.292 visualizaciones

Publicado el

Brief presentation about Drupal 7's theme and template system.

Publicado en: Diseño
  • Sé el primero en comentar

Drupal 7 Theme System

  1. 1. Drupal 7 Theme System
  2. 2. Themehttp://drupal.org/project/themes
  3. 3. Theme from scratch
  4. 4. sites/default/themes/NAME NAME.info
  5. 5. name = My super themecore = 7.xengine = phptemplate
  6. 6. NAME.infostylesheets[all][] = css/style.css all, print,File screen,css/style.css projector
  7. 7. Webkit Inspector FirebugIE Developers Toolbar
  8. 8. NAME.infoscripts[] = js/actions.jsFilejs/actions.js
  9. 9. Regions
  10. 10. Name.inforegions[sidebar] = Sidebarregions[ads_mini] = Small adsregions[ads_big] = Big ads first, sidebar second, content, header, footer, highlighted, help, page_bottom, page_top
  11. 11. NAME.infosettings[main_color] = orange
  12. 12. theme-settings.php
  13. 13. theme_get_settings(VAR);
  14. 14. Templates
  15. 15. Overriding template files copy
  16. 16. Special template files
  17. 17. node--nodeid.tpl.phpnode--type.tpl.phpnode.tpl.phpblock--module--delta.tpl.phpblock--module.tpl.phpblock--region.tpl.phppage.tpl.phppage--node.tpl.phppage--node--%.tpl.phppage--node--1.tpl.phppage--node--edit.tpl.phppage--front.tpl.php http://drupal.org/node/1089656
  18. 18. Template function
  19. 19. theme(HOOK, ARGS[]); image item_list link links table username breadcrumb ...
  20. 20. Overriding template function
  21. 21. 1. NAME_HOOK()2. sites/default/themes/NAME/HOOK.tpl.php3. theme_HOOK()
  22. 22. function mytheme_table($header, $rows, $args)
  23. 23. Preprocess functions
  24. 24. TEMPLATE_preprocess(&$variables, $hook)TEMPLATE_preprocess_HOOK(&$variables)
  25. 25. Defining your own template
  26. 26. HOOK_theme()
  27. 27. Distributing content
  28. 28. Subthemehttp://drupal.org/node/225125

×