Skip to content Skip to navigation

Using Display Suite to Place Node Fields in Blocks

Have you ever looked at a page layout and thought, "Hm, that sure is one long list of fields. It would be nice to be able to place some of that information in a sidebar (or in the footer, etc.)"

In this example, we want to move some of the "Contact Information" fields of an Event node into the first sidebar.

You can do exactly that with the Display Suite Extras module, which is available on Stanford Sites. Here's how.

How the Page Looks to Begin With

Screenshot of an Event node

How to Change It

  1. Enable the Display Suite and Display Suite Extras modules
    Screenshot of the modules page, showing Display Suite and Display Suite Extras modules checked
  2. Enable "Region to Block" at admin/structure/ds/list/extras (in the "Other" tab)
    Screenshot of enabling the Region to Block module
  3. Enable a custom display setting for the Full Content view mode at admin/structure/types/manage/(content_type)/display
    Screenshot showing how to enable a custom display setting for the full content view mode
  4. Edit the display settings for the Full Content view mode at admin/structure/types/manage/(content_type)/display/full
  5. Choose the "One Column" layout and save
    Screenshot showing how to enable a one-column custom layout for the Full Content view mode
  6. Click the "Block Regions" tab and add a new region. Name it a semantic way so that you can find it in the Context or Blocks overview page
    Screenshot of creating a custom block region for your Full Content view mode
  7. Add your fields to that DS region
    Screenshot showing moving several fields to the block region
  8. Create a Context for that content type that places that block in the appropriate region
    Screenshot of the Context UI, showing how to place the block on Event nodes using Context
    (Note: You also can place the block using Drupal's core block system. Context is not required.)

The Final Product

Screenshot of the final node display, with the contact information in the first sidebar

The Tricky Parts

  • You have to choose a view mode other than Default
  • You have to choose a layout for the view mode in order to get the "block regions" tab to appear

References

Categories: 

Comments

To hide the block title from showing, configure the block and set the title to <none>. Then clear cache!