SlideShare a Scribd company logo
1 of 35
Display Suite
A Themer’s Perspective
By Danté Taylor
Mediacurrent Creative Director
              @ThemeMaster
Key Assumptions
 You are familiar using Views Module

 You are familiar with Fields & Content Types

 You understand basic theming concepts

 You understand how to install Drupal modules

 Panels is not your only friend
http://www.flickr.com/photos/26658572@N03/2500158621
Can’t We All
Just Get Along
Display Suite Purpose
 Display Suite allows you to take full control over how
  your content is displayed using a drag and drop
  interface.

 Arrange your nodes, views, comments, user data etc.
  the way you want without having to work your way
  through dozens of template files.

 Packaged with predefined list of layouts


                                             Source: http://drupal.org/project/ds
Module Maintainer
          Written by Kristof De Jaeger
          Experienced web developer ever since PHP 3 came out. He got
          hooked on Drupal after experimenting with tons of other
          frameworks including writing his own - who didn't right ? He has
          written a dozen modules, writes patches for Drupal core and will
          review every single line of code that goes out into production.
          He's not afraid to dive into code and research best performance
          practices in order to save kittens. His passion is so big he got a
          Druplicon tattoo on his wrist. Talk about dedication! Thinks a day
          should have 36 hours so he can finally release that one rock
          album to conquer the world and retire on his own private island.
          Builds arcade machines in the meantime to relive his childhood.




                                           http://krimson.be/about/kristof-de-jaeger
Statistics & Reach
   Maintenance Status: Actively maintained
   Development Status: Under active development
   Reported Installs: 21,846 active sites
   Downloads: 84,275
   Last modified: April 14, 2012
   Stable Version: 7.x-1.5
   Ranked: 113 out of 9728


                                       Source: http://drupal.org/project/ds
Panels vs. Display Suite
 The Display Suite always starts with a single object such as a node
  and offers a way to configure its display by rearranging the fields for
  that node in a fixed 5 column layout.

 Panels is focused on combining different objects such as blocks,
  nodes, Views etc. together in a variety of layouts.

 As mentioned, Panels Pages offer the option to change the layout of
  the detail page of a node and you have the option to create several
  variants based on arguments.



                            Source: http://www.jyvesgarden.com/blog/display-suite-vs-panels
Panels vs. Display Suite
 With the Display Suite you can define the layout of your node
  detail, but it does not take any arguments.

 Double nesting: In DS, you can put your fields in one of the 5
  regions, but inside those regions, you can also group them together
  in fieldgroups.

 Panels is restricted to one level of grouping.




                           Source: http://www.jyvesgarden.com/blog/display-suite-vs-panels
Key Concepts
 View Modes
Key Concepts
 View Modes

 Code Fields
Key Concepts
 View Modes

 Code Fields

 Styles
What are view modes?
View Modes
 View modes are another name for layouts in Display Suite

 They control how the page will be render via templates

 You are allowed to create custom templates

 Unlike the Panalizer Module you can’t mange display the size
  placement of regions through the UI. Although using CSS it is
  possible to achieve similar results
What are code fields?
Code Fields
 For Display Suite code fields are like what cck and and block api is
  for drupal core.

 They all you to add custom and system generated variables directly
  to multiple entity types.

 You can also access any variable that your theme templates have
  access to using dynamic fields
What are DS Styles?
Display Suite Styles
 Display suite styles all you to add custom classes to DS regions

 They allow you to add custom styles to individual fields

 Functions a lot like panels and skinr style options
$ drush dl ds
Getting Started
Getting Started
Getting Started
View Mode
New View
New View
How do you add custom
      Layouts?
Custom Layouts
<?php
function ds_article() {
  return array(
    'label' =>t('Article Layout'),
    'regions' => array(
      'header' =>t('Header'),
      'middle' =>t('Content'),
      'footer' =>t('Footer')
    ),
    // Add this line if there is a default css file.
    'css' => TRUE,
  );
}
?>




                                          themes/demo/ds_article/article.inc
Custom Layouts
<?php
function ds_article() {
  return array(
    'label' =>t('Article Layout'),
    'regions' => array(
      'header' =>t('Header'),
      'middle' =>t('Content'),
      'footer' =>t('Footer')
    ),
    // Add this line if there is a default css file.
    'css' => TRUE,
  );
}
?>




                                          themes/demo/ds_article/article.inc
Custom Layouts
.ds-header{
float:none;
    width:100%
}
.ds-content{
float:none;
    width:100%
}
.ds-footer{
float:none;
    width:100%
}




                 themes/demo/ds_article/article.css
Custom Layouts
 <section class="article-wrapper <?php print $classes;?>clearfix">

 <?php if (isset($title_suffix['contextual_links'])): ?>
 <?php print render($title_suffix['contextual_links']); ?>
 <?phpendif; ?>

 <?php if ($header): ?>
 <header class="ds-header<?php print $header_classes; ?>">
 <?php print $header; ?>
 </header>
 <?phpendif; ?>

 <?php if ($middle): ?>
 <section class="yb-main-content-wrapper">
 <div class="ds-content<?php print $middle_classes; ?>">
 <?php print $middle; ?>
 </div>
 </section>
 <?phpendif; ?>

 <?php if ($footer): ?>
 <footer class="ds-footer<?php print $footer_classes; ?>">
 <?php print $footer; ?>
 </footer>
 <?phpendif; ?>

 </section>
                                                                     ds_article/article.tpl.php
Custom Layouts




                 ds_article/article.tpl.php
Where To Get Help
 http://www.youtube.com/user/swentieman

 http://groups.drupal.org/display-suite

 http://vimeo.com/15863937

 http://drupal.org/node/644706

 http://krimson.be




                           Source: http://www.jyvesgarden.com/blog/display-suite-vs-panels
Don’t Forget to:
Clear Your Cache
Happy Theming!
Mediacurrent helps organizations architect custom websites by
leveraging our proven processes and deep expertise in Drupal.




              @mediacurrentmediacurrent.com

More Related Content

What's hot

Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7
Ivan Zugec
 
5 Important Tools for Drupal Development
5 Important Tools for Drupal Development5 Important Tools for Drupal Development
5 Important Tools for Drupal Development
jcarrig
 
Best Practice Checklist for Building a Drupal Website
Best Practice Checklist for Building a Drupal WebsiteBest Practice Checklist for Building a Drupal Website
Best Practice Checklist for Building a Drupal Website
Acquia
 

What's hot (20)

Creating a Responsive Drupal Theme: Presentation from DrupalCamp Montreal 2012
Creating a Responsive Drupal Theme: Presentation from DrupalCamp Montreal 2012Creating a Responsive Drupal Theme: Presentation from DrupalCamp Montreal 2012
Creating a Responsive Drupal Theme: Presentation from DrupalCamp Montreal 2012
 
A Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 MinutesA Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 Minutes
 
Drupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenDrupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with Zen
 
Responsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsResponsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen Grids
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
 
Drupal south 2014 - bootstrap vs foundation deathmatch - v.1.1
Drupal south 2014 - bootstrap vs foundation deathmatch - v.1.1Drupal south 2014 - bootstrap vs foundation deathmatch - v.1.1
Drupal south 2014 - bootstrap vs foundation deathmatch - v.1.1
 
Bootstrap Framework and Drupal
Bootstrap Framework and DrupalBootstrap Framework and Drupal
Bootstrap Framework and Drupal
 
BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12
 
Intro to Drupal
Intro to DrupalIntro to Drupal
Intro to Drupal
 
Drupal 8 introduction to theming
Drupal 8  introduction to themingDrupal 8  introduction to theming
Drupal 8 introduction to theming
 
Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...
Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...
Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...
 
Drupal Site Building Checklist from DrupalCamp New Jersey
Drupal Site Building Checklist from DrupalCamp New JerseyDrupal Site Building Checklist from DrupalCamp New Jersey
Drupal Site Building Checklist from DrupalCamp New Jersey
 
Drupal For Dummies
Drupal For DummiesDrupal For Dummies
Drupal For Dummies
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7
 
5 Important Tools for Drupal Development
5 Important Tools for Drupal Development5 Important Tools for Drupal Development
5 Important Tools for Drupal Development
 
Best Practice Checklist for Building a Drupal Website
Best Practice Checklist for Building a Drupal WebsiteBest Practice Checklist for Building a Drupal Website
Best Practice Checklist for Building a Drupal Website
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to Drupal
 
DrupalCon Austin 2014 Implement Foundation or Other Front-End Frameworks in Y...
DrupalCon Austin 2014 Implement Foundation or Other Front-End Frameworks in Y...DrupalCon Austin 2014 Implement Foundation or Other Front-End Frameworks in Y...
DrupalCon Austin 2014 Implement Foundation or Other Front-End Frameworks in Y...
 
Top 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies makeTop 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies make
 
Foundation vs Bootstrap - CC FE & UX
Foundation vs Bootstrap - CC FE & UXFoundation vs Bootstrap - CC FE & UX
Foundation vs Bootstrap - CC FE & UX
 

Similar to Display Suite: A Themers Perspective

Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-Theme
Mediacurrent
 
Presentation drupalaton august 2013
Presentation drupalaton august 2013Presentation drupalaton august 2013
Presentation drupalaton august 2013
Bram Goffings
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in Drupal
Wingston
 
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Emma Jane Hogbin Westby
 
Themer's roundtable
Themer's roundtableThemer's roundtable
Themer's roundtable
canarymason
 

Similar to Display Suite: A Themers Perspective (20)

Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
 
SMACSS Workshop
SMACSS WorkshopSMACSS Workshop
SMACSS Workshop
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
 
Drupal
DrupalDrupal
Drupal
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-Theme
 
Presentation drupalaton august 2013
Presentation drupalaton august 2013Presentation drupalaton august 2013
Presentation drupalaton august 2013
 
Presentation drupalaton, August 2013
Presentation drupalaton, August 2013Presentation drupalaton, August 2013
Presentation drupalaton, August 2013
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in Drupal
 
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010
 
SynapseIndia drupal presentation on drupal best practices
SynapseIndia drupal  presentation on drupal best practicesSynapseIndia drupal  presentation on drupal best practices
SynapseIndia drupal presentation on drupal best practices
 
Visualizing Content with Display Suite
Visualizing Content with Display SuiteVisualizing Content with Display Suite
Visualizing Content with Display Suite
 
Themer's roundtable
Themer's roundtableThemer's roundtable
Themer's roundtable
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
 
D7 theming what's new - London
D7 theming what's new - LondonD7 theming what's new - London
D7 theming what's new - London
 
Design to Theme @ CMSExpo
Design to Theme @ CMSExpoDesign to Theme @ CMSExpo
Design to Theme @ CMSExpo
 
Drupal theme development
Drupal theme developmentDrupal theme development
Drupal theme development
 

More from Mediacurrent

More from Mediacurrent (20)

Penn State News: Pivoting to Decoupled Drupal with Gatsby
Penn State News: Pivoting to Decoupled Drupal with GatsbyPenn State News: Pivoting to Decoupled Drupal with Gatsby
Penn State News: Pivoting to Decoupled Drupal with Gatsby
 
Evolving How We Measure Digital Success in Higher Ed
Evolving How We Measure Digital Success in Higher EdEvolving How We Measure Digital Success in Higher Ed
Evolving How We Measure Digital Success in Higher Ed
 
Penn State scales static Drupal to new heights
Penn State scales static Drupal to new heightsPenn State scales static Drupal to new heights
Penn State scales static Drupal to new heights
 
Delivering Meaningful Digital Experiences in Higher Ed
Delivering Meaningful Digital Experiences in Higher EdDelivering Meaningful Digital Experiences in Higher Ed
Delivering Meaningful Digital Experiences in Higher Ed
 
Content Strategy: Building Connections with Your Audience
Content Strategy: Building Connections with Your AudienceContent Strategy: Building Connections with Your Audience
Content Strategy: Building Connections with Your Audience
 
Decoupled Drupal and Gatsby in the Real World
Decoupled Drupal and Gatsby in the Real WorldDecoupled Drupal and Gatsby in the Real World
Decoupled Drupal and Gatsby in the Real World
 
A Better Way to Build and Manage Sites with Rain for Drupal 9
A Better Way to Build and Manage Sites with Rain for Drupal 9A Better Way to Build and Manage Sites with Rain for Drupal 9
A Better Way to Build and Manage Sites with Rain for Drupal 9
 
Drupal Security: What You Need to Know
Drupal Security: What You Need to KnowDrupal Security: What You Need to Know
Drupal Security: What You Need to Know
 
Leveraging Design Systems to Streamline Web Projects
Leveraging Design Systems to Streamline Web ProjectsLeveraging Design Systems to Streamline Web Projects
Leveraging Design Systems to Streamline Web Projects
 
Reimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web StrategyReimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web Strategy
 
How to Digitally Transform Higher Ed with Drupal
How to Digitally Transform Higher Ed with DrupalHow to Digitally Transform Higher Ed with Drupal
How to Digitally Transform Higher Ed with Drupal
 
Is my website accessible? Common mistakes (and how to fix them)
Is my website accessible? Common mistakes (and how to fix them)Is my website accessible? Common mistakes (and how to fix them)
Is my website accessible? Common mistakes (and how to fix them)
 
Managing Images In Large Scale Drupal 8 & 9 Websites
Managing Images In Large Scale Drupal 8 & 9 WebsitesManaging Images In Large Scale Drupal 8 & 9 Websites
Managing Images In Large Scale Drupal 8 & 9 Websites
 
Paragraphs v Layout Builder - The Final Showdown
Paragraphs v Layout Builder - The Final ShowdownParagraphs v Layout Builder - The Final Showdown
Paragraphs v Layout Builder - The Final Showdown
 
MagMutual.com: On the JAMStack with Gatsby and Drupal 8
 MagMutual.com: On the JAMStack with Gatsby and Drupal 8 MagMutual.com: On the JAMStack with Gatsby and Drupal 8
MagMutual.com: On the JAMStack with Gatsby and Drupal 8
 
Creating an Organizational Culture of Giving Back to Drupal
Creating an Organizational Culture of Giving Back to DrupalCreating an Organizational Culture of Giving Back to Drupal
Creating an Organizational Culture of Giving Back to Drupal
 
Level Up Your Team: Front-End Development Best Practices
Level Up Your Team: Front-End Development Best PracticesLevel Up Your Team: Front-End Development Best Practices
Level Up Your Team: Front-End Development Best Practices
 
Best Practices for Moving to Drupal 9
Best Practices for Moving to Drupal 9Best Practices for Moving to Drupal 9
Best Practices for Moving to Drupal 9
 
How to Prove Marketing ROI: Overcoming Digital Marketing Challenges
How to Prove Marketing ROI: Overcoming Digital Marketing ChallengesHow to Prove Marketing ROI: Overcoming Digital Marketing Challenges
How to Prove Marketing ROI: Overcoming Digital Marketing Challenges
 
Prepare Your Drupal 9 Action Plan
Prepare Your Drupal 9 Action Plan Prepare Your Drupal 9 Action Plan
Prepare Your Drupal 9 Action Plan
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Display Suite: A Themers Perspective

  • 2. By Danté Taylor Mediacurrent Creative Director @ThemeMaster
  • 3. Key Assumptions  You are familiar using Views Module  You are familiar with Fields & Content Types  You understand basic theming concepts  You understand how to install Drupal modules  Panels is not your only friend
  • 6. Display Suite Purpose  Display Suite allows you to take full control over how your content is displayed using a drag and drop interface.  Arrange your nodes, views, comments, user data etc. the way you want without having to work your way through dozens of template files.  Packaged with predefined list of layouts Source: http://drupal.org/project/ds
  • 7. Module Maintainer Written by Kristof De Jaeger Experienced web developer ever since PHP 3 came out. He got hooked on Drupal after experimenting with tons of other frameworks including writing his own - who didn't right ? He has written a dozen modules, writes patches for Drupal core and will review every single line of code that goes out into production. He's not afraid to dive into code and research best performance practices in order to save kittens. His passion is so big he got a Druplicon tattoo on his wrist. Talk about dedication! Thinks a day should have 36 hours so he can finally release that one rock album to conquer the world and retire on his own private island. Builds arcade machines in the meantime to relive his childhood. http://krimson.be/about/kristof-de-jaeger
  • 8. Statistics & Reach  Maintenance Status: Actively maintained  Development Status: Under active development  Reported Installs: 21,846 active sites  Downloads: 84,275  Last modified: April 14, 2012  Stable Version: 7.x-1.5  Ranked: 113 out of 9728 Source: http://drupal.org/project/ds
  • 9. Panels vs. Display Suite  The Display Suite always starts with a single object such as a node and offers a way to configure its display by rearranging the fields for that node in a fixed 5 column layout.  Panels is focused on combining different objects such as blocks, nodes, Views etc. together in a variety of layouts.  As mentioned, Panels Pages offer the option to change the layout of the detail page of a node and you have the option to create several variants based on arguments. Source: http://www.jyvesgarden.com/blog/display-suite-vs-panels
  • 10. Panels vs. Display Suite  With the Display Suite you can define the layout of your node detail, but it does not take any arguments.  Double nesting: In DS, you can put your fields in one of the 5 regions, but inside those regions, you can also group them together in fieldgroups.  Panels is restricted to one level of grouping. Source: http://www.jyvesgarden.com/blog/display-suite-vs-panels
  • 12. Key Concepts  View Modes  Code Fields
  • 13. Key Concepts  View Modes  Code Fields  Styles
  • 14. What are view modes?
  • 15. View Modes  View modes are another name for layouts in Display Suite  They control how the page will be render via templates  You are allowed to create custom templates  Unlike the Panalizer Module you can’t mange display the size placement of regions through the UI. Although using CSS it is possible to achieve similar results
  • 16. What are code fields?
  • 17. Code Fields  For Display Suite code fields are like what cck and and block api is for drupal core.  They all you to add custom and system generated variables directly to multiple entity types.  You can also access any variable that your theme templates have access to using dynamic fields
  • 18. What are DS Styles?
  • 19. Display Suite Styles  Display suite styles all you to add custom classes to DS regions  They allow you to add custom styles to individual fields  Functions a lot like panels and skinr style options
  • 27. How do you add custom Layouts?
  • 28. Custom Layouts <?php function ds_article() { return array( 'label' =>t('Article Layout'), 'regions' => array( 'header' =>t('Header'), 'middle' =>t('Content'), 'footer' =>t('Footer') ), // Add this line if there is a default css file. 'css' => TRUE, ); } ?> themes/demo/ds_article/article.inc
  • 29. Custom Layouts <?php function ds_article() { return array( 'label' =>t('Article Layout'), 'regions' => array( 'header' =>t('Header'), 'middle' =>t('Content'), 'footer' =>t('Footer') ), // Add this line if there is a default css file. 'css' => TRUE, ); } ?> themes/demo/ds_article/article.inc
  • 30. Custom Layouts .ds-header{ float:none; width:100% } .ds-content{ float:none; width:100% } .ds-footer{ float:none; width:100% } themes/demo/ds_article/article.css
  • 31. Custom Layouts <section class="article-wrapper <?php print $classes;?>clearfix"> <?php if (isset($title_suffix['contextual_links'])): ?> <?php print render($title_suffix['contextual_links']); ?> <?phpendif; ?> <?php if ($header): ?> <header class="ds-header<?php print $header_classes; ?>"> <?php print $header; ?> </header> <?phpendif; ?> <?php if ($middle): ?> <section class="yb-main-content-wrapper"> <div class="ds-content<?php print $middle_classes; ?>"> <?php print $middle; ?> </div> </section> <?phpendif; ?> <?php if ($footer): ?> <footer class="ds-footer<?php print $footer_classes; ?>"> <?php print $footer; ?> </footer> <?phpendif; ?> </section> ds_article/article.tpl.php
  • 32. Custom Layouts ds_article/article.tpl.php
  • 33. Where To Get Help  http://www.youtube.com/user/swentieman  http://groups.drupal.org/display-suite  http://vimeo.com/15863937  http://drupal.org/node/644706  http://krimson.be Source: http://www.jyvesgarden.com/blog/display-suite-vs-panels
  • 34. Don’t Forget to: Clear Your Cache Happy Theming!
  • 35. Mediacurrent helps organizations architect custom websites by leveraging our proven processes and deep expertise in Drupal. @mediacurrentmediacurrent.com