drupal 8 theming

21
INTRODUCTION TO DRUPAL 8 THEMING Suryanto Rachmat Pratomo Ardianto

Upload: suryanto-rachmat

Post on 15-Jan-2015

404 views

Category:

Technology


5 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Drupal 8 theming

INTRODUCTION TO DRUPAL 8 THEMINGSuryanto Rachmat Pratomo Ardianto

Page 2: Drupal 8 theming

WHAT’S NEW

• Completely new theme system: Twig

• New javascript libraries: jQuery 2.0, Underscore.js & Backbone.js (not loaded by default)

• .info files are now .info.yml

Page 3: Drupal 8 theming

WHAT’S GONE?• theme_ * functions not used (use Twig templating

system .html.twig instead)

• Most first/last/odd/even classes removed in favor of CSS3 pseudo selectors

• Garland removed from Drupal core

• Internet Explorer 6, 7 and 8 no longer fully supported (https://drupal.org/project/ie8)

Page 4: Drupal 8 theming

WHAT’S THE SAME?

• Region and blocks

• Preprocess function

Page 5: Drupal 8 theming

WHAT DOES IT LOOK LIKE?

Page 6: Drupal 8 theming

WHAT DOES IT LOOK LIKE? .info.yml

Page 7: Drupal 8 theming

.THEME FILE

Page 8: Drupal 8 theming

NODE.HTML.TWIG

Page 9: Drupal 8 theming

SYSTEM TEMPLATES core/modules/system/templates

Page 10: Drupal 8 theming

BREADCRUMB TEMPLATE core/modules/system/breadcrumb.html.twig

Page 11: Drupal 8 theming

TWIG TEMPLATES

Page 12: Drupal 8 theming

MORE READABLE TEMPLATE

Page 13: Drupal 8 theming

TWIG DELIMITERS

Page 14: Drupal 8 theming

VARIABLES

Page 15: Drupal 8 theming

FILTERS

Page 16: Drupal 8 theming

CONTROL STRUCTURE

Page 17: Drupal 8 theming

INCLUDING OTHER TEMPLATES FILE

Page 18: Drupal 8 theming

TEMPLATE INHERITANCE

Page 19: Drupal 8 theming

CHILD TEMPLATE FILE

Page 20: Drupal 8 theming

EXTENDING TWIG

• custom filters

• custom functions

• custom tags

Page 21: Drupal 8 theming

QUESTION?