Super Simple Drupal Layout with Region View Modes
by Jeff Amaral
Combining Drupal core’s view modes and theme regions with a small home-grown module created a new way to lay out node pages.
The resulting module, Region View Modes, places copies of nodes, rendered through specific view modes, into theme regions. Yes, those are the same regions into which you would normally place blocks. There’s no new layout system here. You use the one you already have: your theme.
Once enabled, using the module is pretty easy:
- Visit the Manage Display page for any content type (e.g. Article)
- Expand the Custom Display Settings section
- Check the view mode for one or more theme:region combinations. For example, Bartik theme: Sidebar first region
- Click Save at the bottom of the page
- You’ll now see the activated view mode(s) near the top of the page. Click on one.
- Reorder, hide, or change the settings for any fields
- View a node of that content type
Here’s a demo:
That’s all you need to know to use the module, but if you’re curious about how it works, read on!...
Original Article: