Drupal - Blocks vs Context vs Panels

47,326 views

Published on

This is the presentation that I put together for DrupalCamp Philadelphia. It discusses the difference in building pages in Drupal using core block system vs Context module or Panels.

Published in: Education, Technology, Business
1 Comment
26 Likes
Statistics
Notes
  • Thx so much for this simple explication :D
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
47,326
On SlideShare
0
From Embeds
0
Number of Embeds
604
Actions
Shares
0
Downloads
433
Comments
1
Likes
26
Embeds 0
No embeds

No notes for slide

Drupal - Blocks vs Context vs Panels

  1. 1. CONSULTING DEVELOPMENT TRAINING & don’t forget videos!
  2. 3. Building Pages Blocks vs Context vs Panels
  3. 4. What is a page? <ul><li>HTML Rendered by Drupal </li><ul><li>Through a series of hooks and preprocessors </li></ul></ul>How does Drupal build pages? <ul><li>Menus
  4. 5. Regions
  5. 6. Blocks
  6. 7. Node
  7. 8. Widgets / Content provided by modules* </li></ul>
  8. 9. BLOCKS
  9. 10. What is a block? How does the current block system work? <ul><li>Regions </li><ul><li>provided by theme </li></ul><li>Visibility </li><ul><li>Enabled / Disabled
  10. 11. Path
  11. 12. Roles
  12. 13. Custom </li><ul><li>PHP in database = BAD </li></ul></ul><li>http://drupal.org/handbook/modules/block </li></ul>
  13. 14. CONTEXT The advanced page builder
  14. 15. What is Context? “ Context allows you to manage contextual conditions and reactions for different portions of your site.” - http://drupal.org/project/context It is a module. http://drupal.org/project/context
  15. 16. Context UI
  16. 17. What does Context allow us to do? <ul><li>Much more powerful than block system. </li><ul><li>Menus
  17. 18. Views
  18. 19. Theme
  19. 20. No PHP in DB ❤ </li></ul><li>Multiple context can exist per page. </li></ul>
  20. 21. Panels The visual page builder
  21. 22. What is Panels? <ul>“ At its core it is a drag and drop content manager that lets you visually design a layout and place content within that layout.” </ul>
  22. 23. PANELS UI
  23. 24. What does Panels allow us to do? <ul><li>Drag-n-drop
  24. 25. Much more powerful than block system. </li><ul><li>Menus
  25. 26. Views
  26. 27. Theme </li></ul><li>Built-in Caching mechanism
  27. 28. Content within page is aware of other content
  28. 29. Not limited to template regions </li></ul>
  29. 30. What are the benefits of using Panels or Context? <ul><li>More efficient
  30. 31. Rapid Development
  31. 32. Control more than blocks
  32. 33. Exportable ❤
  33. 34. The FUTURE </li></ul>
  34. 35. PANELS vs CONTEXT Pros <ul><li>Powerful
  35. 36. Point-n-Click
  36. 37. Not dependent on template
  37. 38. Content/Context aware
  38. 39. Caching </li></ul>Cons <ul><li>Path dependent
  39. 40. Complex UI </li></ul>Pros <ul><li>Powerful
  40. 41. Point-n-Click
  41. 42. Content/Context aware
  42. 43. Simple UI </li></ul>Cons <ul><li>Abstract
  43. 44. Limited layout options </li></ul>
  44. 45. When should I use Panels? <ul><li>Client or site-builders need to move content around
  45. 46. Complex page layouts
  46. 47. URL structured layouts </li><ul><li>Variants – gives more flexibility </li></ul></ul>When should I use Context? <ul><li>Developer driven site
  47. 48. Theme provides enough regions </li><ul><li>Context Layout – gives more flexibility </li></ul><li>Context driven layouts </li></ul>

×