Visualizing Content with Display Suite

  • 3,129 views
Uploaded on

Slides from a talk I gave for the Singaporean Drupal user group. (1st march 2011)

Slides from a talk I gave for the Singaporean Drupal user group. (1st march 2011)

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,129
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
22
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Content visualization with Display Suite Drupal Meetup Singapore 1 st March 2011
  • 2. O hi!
    • Matthias Vandermaesen
    • 3. Drupal Ninja from Belgium
    • 4. @netsensei
  • 5. Wordpress
  • 6. Krimson http://www.krimson.be
  • 7. Krimson
  • 8. Mollom Http://www.mollom.com
  • 9. Pandion Http://pandion.im
  • 10. Teach you how to control Drupal's output of content in a fast, easy and efficient way. Subject of the day
  • 11. The problem Let's take a look at an example...
  • 12. The problem
  • 13. The problem
    • Modern websites have/are...
      • Complex layouts
        • Stacked, columns, column spanning,...
        • 14. Grid systems
      • Various layouts
        • Content detail pages, overview pages, landing pages, Frontpage,...
      • Dynamic
        • Elements are removed or added dynamically
        • 15. Path, logged in, session,...
  • 16. The problem Where do I show stuff on my site? When does it have to be shown? How will it be shown? Who can see stuff on my site? ...
  • 17. Two core concepts
    • Two important concepts:
      • Context
        • When will/should content be shown?
        • 18. If vars A, B, C then show elements 1, 2, 3
      • Layout
        • Where will/should content be shown?
    • Where on your site =/= where in your layout
      • Where on your site refers to a context
  • 19. Our challenge Our challenge Translate a static design, wireframes, requirements into a fully fledged Drupal based website
  • 20. Two core concepts Today I'm only going to talk about controlling 'where' content gets placed in your layout
  • 21. Drupals' limitations
  • 22. Limitations
    • Limitation #1: Controlling how objects get displayed
      • Limited number of build modes
      • 23. Hard to order fields within a build mode
        • Frontend <> Backend
        • 24. Clunky interface
      • Hard to add extra content in a build mode
      • 25. Hard to order fields
      • 26. Hard to position fields
  • 27. Limitations
    • Limitation #2: Controlling Views
      • 2 row style plugins: Fields & Node
      • 28. Fields hell
        • Order fields
        • 29. Different Views displays ~ variations of content
      • Theming hell
        • “Views needs more <div>”
        • 30. Template galore
  • 31. Limitations
    • Limitation #3: Theming Layer
      • Template suggestions hell
        • Herding cats
        • 32. node-...tpl.php, page-...tpl.php,...
      • Easy to mingle business / presentational logic
        • Clutter op you tpl's and template.php with extra PHP
        • 33. Classic: “if path = x then show z”
      • Base themes (like Zen) don't always make it easier
  • 34. Theming hell
  • 35. Limitations
    • Limitation #5: no central command
  • 41. The problem
    • Inefficient development
    • 42. Not user friendly / flexible
      • Content editors might be deterred
    • Maintainability
      • Upgrade without breaking
      • 43. Hard to debug
    • Security
      • PHP Filter: no-no!
  • 44. The problem Drupal can do better!
  • 45. Contrib to the rescue
  • 46. Contrib to the rescue
  • 52. Display Suite http://drupal.org/project/ds
  • 53. Display Suite “ DS is an API that other modules can use to store and manipulate display data for objects (nodes, users, comments etc).”
  • 54. Display Suite Demonstration
  • 55. Display Suite
    • Define custom build modes per Drupal object
    • 56. Define custom fields (with token support)
    • 57. Define custom field groups
    • 58. Support for formatters
    • 59. Plugins alter build modes @ runtime
    • 60. It's an API : DS itself doesn't do anything
  • 61. Display Suite + ...
    • ND, ND_contrib
      • Node display, CCK integration, Fivestar,...
    • VD :: Views display integration
    • 62. CD :: Comments display integration
    • 63. UD :: User display integration
    • 64. ...
    • 65. http://drupal.org/node/644662
    • 66. In D7 => DS Extra's
  • 67. Display Suite + ...
    • ND, ND_contrib
      • Node display, CCK integration, Fivestar,...
    • VD :: Views display integration
    • 68. CD :: Comments display integration
    • 69. UD :: User display integration
    • 70. ...
    • 71. http://drupal.org/node/644662
    • 72. In D7 => DS Extra's
  • 73. Display Suite
    • What is a build mode?
      • A display definition for an object (Teaser, Full node,...)
      • 74. “How should it be displayed”
      • 75. In D7: Build mode = View mode
    • Build mode ~ Layout
    • 76. Layout: 5 regions :: header, footer, left, middle, right
      • Hold Object properties (CCK fields,...)
      • 77. Hold DS Custom fields
      • 78. Hold Blocks
  • 79. Display Suite
    • Formatter support
      • Formats individual CCK fields
        • Defines “How will this field be displayed”
      • Custom formatters module
      • 80. http://drupal.org/project/custom_formatters
        • Write your own formatters
      • ImageCache formatters
      • 81. http://drupal.org/project/imagecache
        • Caches images / based on CCK ImageField
      • Integrates with CCK, DS, Views, Panels,...
  • 82. Display Suite
    • Build modes
      • Take over the default build modes
      • 83. Define your own custom build modes
    • Integrates with Views row styles
      • Views fields vs Node object
    • Comes with minimal CSS for DS regions
      • Easy positioning of regions so you don't have to
      • 84. Consistent styling
  • 85. Display Suite
    • DS manages the display of Drupal objects ...
      • Easy management at object level
      • 86. Stylesheet delight
        • Few basic predefined styles (regions)
        • 87. Completely overrideable
      • Template suggestions in your theme
        • Reduce overriden tpl's for extra classes,...
        • 88. Unless you want to add extra variables
  • 89. Display Suite
    • ... DS does not control your entire page layout
      • Panels + Panels Everywhere modules
    • ... DS is not context aware!
      • Context module + DS for node displays
      • 90. Views integration
      • 91. DS Plugins for @ runtime changes
      • 92. Custom DS fields
  • 93. Display Suite Questions? Matthias Vandermaesen @netsensei Http://www.krimson.be