Display suite part 2: View modes and fields
In part 2 of this Display suite series, I'll show you how to create custom view modes and how to expose blocks as a field.
Also don't forget to check out the Display Suite for Drupal 7 playlist on youtube.
Custom views modes
In Drupal 7 entity view modes have become a lot more powerful. With Display suite you are able to create custom view modes for any node or comment, without writing any code.
To create a custom view mode, click on the View modes link from the Display suite administration page.
Click on Add a view mode, fill out the form then click on Save.
If we go back to the Manage display, you should see the view mode in the Custom display settings tab.
Exposing blocks as fields and custom fields
One of Display suites strength is the ability to create custom fields and exposing blocks as fields, let me explain.
Click on Fields link from the Display suite administration page.
Let’s say you want to add some hard coded call to action text into a content type display. You can do this by creating a field, then assigning it to a region like any other field.
Click on the Add a field link and fill out the form. Make sure you select the right Text format, for this example select Filtered HTML.
The other ability is to expose blocks as fields and then assign them to a region.
Click on the Add a block field link. Give the field a name then select which block you want to use from the Block select box.
Fill out the rest of the form then click on Save.
Go back to the Manage display page and assign the custom fields to a region.
As you can see Display suite is a very powerful module. It saves site builders from overriding a lot of templates.
If you have any problems or questions please leave a comment.