Display Suite

Important note

Documentation for the Display Suite module exists in a more complete form already.

Drupal 7 - Using Display Suite

Display Suite is a powerful, highly extensible module that gives developers complete control over how content is displayed. It features an intuitive, drag-and-drop interface and includes a group of pre-configured layouts that make it even easier to control the display of your nodes, views, comments, etc.

Drupalize.Me offers a whole series of free videos exploring the ins and outs of Display Suite...

Chapter 1.) Installing Display Suite

Chapter 2.) Configuring a Layout in Display Suite

Chapter 3.) Working with Fields in Display Suite

Chapter 4.) View Modes in Display Suite

Chapter 5.) The Search Display Submodule

Chapter 6.) Working with Field Templates

Export Display Suite settings

This documentation is written for the 7.x-2.x version of Display Suite.

Display Suite exposes all its settings (displays, fields and view modes) to CTools. This allows you to easily move the displays that you configured to another environment (e.g., from the development to the staging environment).

You can export Display Suite settings with the modules Features or the CTools sub module Bulk Export.

Export settings using Bulk Export

  • Enable the module Bulk Export at Administration > Modules (admin/modules)
  • Go to Administration > Structure > Bulk Exporter (admin/structure/bulk-export)
  • Choose the vertical tab "Display Suite"
  • Select all the elements that you want to export
  • Enter a module name, e.g., "ds-settings"
  • Click "Export". Bulk Export generates export code that needs to be placed in a module.
  • Create a folder, e.g., "ds-settings" in the modules directory of your website. Copy and paste the export code into the respective files, e.g., "ds-settings.info", "ds-settings.module" and "ds-settings.inc".

You can now move this module to another environment (e.g., staging) and enable it there.

Manage content editing forms

This documentation is written for the 7.x-2.x version of Display Suite.

Display Suite allows you to manage the display of content editing forms for entities (such as nodes, views, comments, users, et cetera). This can be useful if you want to provide the users of your website with a customized edit form.

When enabled Display Suite Forms takes over the Drupal core functionality that let you arrange the fields via the "Manage fields” tab.

Control markup with field templates

This documentation is written for the 7.x-2.x version of Display Suite.

By default Drupal core wraps fields in multiple HTML elements, as e.g., in:

<div class="field field-name-field-size field-type-text field-label-above">
  <div class="field-label">Size:&nbsp;</div>
  <div class="field-items">
    <div class="field-item even">34</div>
  </div>
</div>

Display Suite allows you to override this markup via the user interface by using field templates. This could result in the following markup for the example above:

<div class="label-above">Size:&nbsp;</div>
34   

Enable field templates

To use Display Suite field templates:

  • Enable the sub module Display Suite Extras at Administration > Modules (admin/modules)
  • Go to Administration > Structure > Display Suite and click the secondary tab "Extras" (admin/structure/ds/extras)
  • Check the option "Enable Field templates"
  • Choose a Default Field Template (e.g., "Full reset" to remove all markup from a field)
  • Click "Save configuration"
  • Go to Administration > Structure > Display Suite (admin/structure/ds/layout) and choose "manage display” for the desired entity.
  • Click the cogwheel left of the field that you want to change.

Add fields to a block

This documentation is written for the 7.x-2.x version of Display Suite.

Display Suite allows you to put certain fields inside a region that will be rendered as a block. This can then be managed via the Drupal core block administration.

Note: this works only for custom view modes of nodes. Preprocess fields will not be visible.

To add fields to a block:

  • Enable the sub module Display Suite Extras at Administration > Modules (admin/modules)
  • Go to Administration > Structure > Display Suite and click the secondary tab "Extras" (admin/structure/ds/extras)
  • Select the vertical tab "Others"
  • Check "Region to block"
  • Click "Save configuration"
  • Go to Administration > Structure > Display Suite (admin/structure/ds/layout) and choose "manage display” for the desired content type (e.g., "Article").
  • Select a custom view mode (e.g., "Compact teaser")
  • Ensure a layout is selected in the vertical tab "Layout for … in ..."
  • Click "Save"
  • Choose the vertical tab "Block regions"
  • Enter a name for the region that will be rendered as a block
  • Click "Save"

The region is now available in the manage display screen and you can assign fields to it.

Pages

Subscribe with RSS Subscribe to RSS - Display Suite