Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DrupalRS_17: .tpl vs Panels vs Display Suite ...vs Drupal Front-end developer

DrupalRS_17: .tpl vs Panels vs Display Suite ...vs Drupal Front-end developer

This talk was (not) presented on Drupal meeting in Serbia, in Novi Sad, Crna Kuća. The temperature was probably around ~40° during the day so only two guys were there, other presenter and Pedja :)

However, we will repeat that to maybe even greater extend as subject is very important for every Drupal site builder and both tools, Panels and Display suite provide different ways for the builder (programmer) to augment the theme and present the data in better UI leading to much better UX.

Mladen Đurić

July 29, 2013
Tweet

More Decks by Mladen Đurić

Other Decks in Education

Transcript

  1. MLADEN ĐURIĆ @macmladen mladen@bluefish.rs • Apple • Web Blue Fish

    d.o.o. • Novi Sad • Srbija • http://bluefish.rs • office@bluefish.rs
  2. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs DRUPAL AS DRUPAL For as long as I've been working with Drupal, there's been a wonderful tension on how to make Drupal not look like Drupal. People have taken great pride in being able to recognize a Drupal site both from the rendered page in a browser, and by looking at the code. How frustrating for graphic designers who want to create an experience, not just decorate Drupal! With a greater understanding of the contributed module space, it becomes infinitely easier to make Drupal look like your solution, instead of making your solution look like Drupal.
  3. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs DRUPAL LAYOUT Each major revision of Drupal has seen a new point-and-click tool introduced into the contrib space.  In Drupal 5 we got Panels.  In Drupal 6 we got Display Suite.  Drupal 7 we got many responsive, very complex user configurable themes It's been fascinating to watch the evolution of our layout tool kit… and frustrating for new-to-Drupalers to know which one to pick.
  4. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs DRUPAL LAYOUT TOOLS If we oversimplify what these UI-based layout tools do, we can divide the tools out as follows: 1. Breaking down and altering the node.tpl.php file (e.g. Display Suite). 2. Breaking down and altering the page.tpl.php file (e.g. Omega and Context ). 3. Building up new layouts by pulling in specified Drupal components at the page or region level (e.g. Panels).
  5. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs DRUPAL LAYOUT CHOICE As you can see, the approaches are somewhat complementary, except when they're not. This can make it difficult to know which suite of modules (and themes) you should choose for your particular project. Some of the concepts developed in Panels are going into Drupal 8. BUT! It's not the right tool for every site builder and themer.
  6. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs SO WHERE DO YOU START?
  7. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs .TPL Pro:  Core Drupal mechanism based on PHP Template engine  Every possible logic possible Con:  Soon to be challenged by Twig templating  Tied to particular theme, no DRY (Do not Repeat Yourself!)
  8. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs PANELS Project: https://drupal.org/project/panels Author: Earl Miles (a.k.a merlinofchaos) Pros:  Seems future proof (D8 - SCOTCH initiative, Panels in Core)  Knowing Views introduces you to Panels  Crazy flexible  Even sub-divisible (mini panels = blocks) Cons:  Complexity inherited
  9. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs PANELS I won't lie, there's a learning curve associated with this very powerful module. If you just want to shuffle some fields around in your content type display, this is not the module for you. You should use Panels, however, when you need to:  display a block in multiple locations for different contexts  alter the layout of core Drupal pages, such as the taxonomy page  provide different layouts under different conditions, such as the homepage for an authenticated or anonymous visitor.
  10. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs PANELS Yes, bits and pieces of these elements can also be found in other modules, such as Context, but in most other cases you are spread across multiple configuration screens, instead of having a single control interface. Before rushing out to install Panels, take a look at free video series on using Panels by the TWIG initiative lead, Jen Lampton at http://Drupalize.me I hope that you end up appreciating Panels, but we can still be friends if you decide it's overkill for your needs.
  11. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs DISPLAY SUITE Project: https://drupal.org/project/ds Author: Kristof De Jaeger (a.k.a swentel) Pro:  Relatively easy  Very flexible  Fully exportable  Author is Core Field developer Con:  Not that I am aware of
  12. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs DISPLAY SUITE This is a beautiful little module. It fits politely into Drupal's existing administrative interface for managing content type fields. Display Suite can be used, for instance, to break Blog display into the classic two column WordPress display: one side for the content, and one side with the date. It seems a little bit revolutionary that you could just click a few things and never have to open a text editor (or force a client to insert scary HTML tags into post) to make a two-col layout. Yum!
  13. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs DISPLAY SUITE You may also fell in love with Drupal's built-in View Modes after playing with Display Suite. Instead of perverting Views you are able to get fine grained control of your nodes through Display Suite. (Don't pretend like you haven't used Views to "fix" the Default layout of your content type. We've all done it at least once.) If it sounds like the breath of fresh air you've been looking for, check out our free video series on using Display Suite.
  14. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs BOTTOM LINE  Drupal is as abstract as it can be (becoming even more all the time)  That is good so you should ride on that wave  Things can be done in more than one way and each has its own ups and downs  .TPL is for hard-core, die hards but not necessarily the best way  Panels is for medium sick people (those curable)  Display suite is for nice guys & gals (a.k.a) builders  They do not exclude each other so feel free to mix  Remember, each tool has its purpose and is limited only by your own imagination  Always feel free to try, explore, Drupal is not finite thing
  15. Blue Fish d.o.o. • Novi Sad • Srbija • http://bluefish.rs

    • office@bluefish.rs RESOURCES: http://drupalize.me Code-Free Layout Tools for Theming Drupal Building Websites in Drupal 7 Using Panels Display Suite for Drupal 7 Drupal.org Panels Display Suite