Blocks & Layouts in D7 - Josef Dabernig

447 views

Published on

Drupal 7 site builders are presented with a variety of tools to create complex layouts. In this session, I will talk about our in-house tool-chain at drunomics for building sites with dynamic layouts.

Published in: Internet, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
447
On SlideShare
0
From Embeds
0
Number of Embeds
75
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Blocks & Layouts in D7 - Josef Dabernig

  1. 1. BLOCKS & LAYOUTS From Drupal 7 to 8
  2. 2. @DASJO Josef Dabernig
  3. 3. http://dasjo.at/
 blocks-layouts-szeged
  4. 4. THIS IS MY FAVORITE BLOCKS & LAYOUTS RELATED MODULE
  5. 5. IT ALL BEGINS…
  6. 6. • Themes • Regions • Blocks • Templates BASICS
  7. 7. CORE BLOCKS
  8. 8. CHALLENGES • Too much going on at admin/structure/block • Can’t export block configuration • Custom blocks depend on global “context” information
 $node = node_load(arg(2)); • Content region vs. other regions
  9. 9. COMPOSITION PATTERNS
  10. 10. • Custom blocks • Contextual views • EVA • and… COMPOSITION PATTERNS
  11. 11. • Custom blocks • Contextual views • EVA • and… COMPOSITION PATTERNS • Context • Panels • Display suite • and…
  12. 12. BLOCKS & LAYOUTS
  13. 13. BLOCKS & LAYOUTS
  14. 14. CONTEXT, 
 DISPLAY SUITE & 
 PANELS
  15. 15. CONTEXT • React & do something • Conditionally place blocks
  16. 16. DISPLAY SUITE • Extends “manage display” • Use custom layouts • Define view modes • Code fields, dynamic fields, block fields, preprocess fields
  17. 17. PANELS • The most successful layout solution for Drupal 7 • Huge ecosystem, includes Page manager,“Panels Context”, Panelizer, In-place editor, CTools content plug-ins, …
  18. 18. PUSH ~ PULL
  19. 19. CONTEXT ~ PANELS, DS
  20. 20. PAGEVARIANTS
  21. 21. SELECTION RULES
  22. 22. LAYOUT SELECTION
  23. 23. CONTENT PLACEMENT
  24. 24. PAGE MANAGER
  25. 25. PANELIZER
  26. 26. IN-PLACE EDITOR
  27. 27. PANELS • Panels everywhere (take over regions & page.tpl) • Page manager existing pages • Fieldable panels panes (embeddable entities) • Field API Pane Editor (D8 in-place editing, Spark)
  28. 28. VIEWS CONTENT PANES
  29. 29. WSCCI + SCOTCH 
 ≈ DRUPAL 8
  30. 30. • Blocks are Plugins • Object-oriented • Extensible • Annotation config DRUPAL 8
  31. 31. • Block library • Custom block
 types • Fields, revisions
 & view modes DRUPAL 8
  32. 32. • Place block instances DRUPAL 8
  33. 33. • Twig instead of .tpl.php DRUPAL 8
  34. 34. THANKS & HAPPY BUILDING
  35. 35. • Blocks 
 https://groups.drupal.org/node/160144 • Introduction to Panopoly by Adrian Webb
 (Panels screenshots)
 http://prezi.com/0l_derrjnmbx/introduction-to- panopoly/ CREDITS

×