Experimental project
This is a sandbox project, which contains experimental code for developer use only.
Overview
The Display Suite Custom Node Layouts module extends the 'View mode per node' functionality provided by the Display Suite Module (via the included DS Extras submodule), allowing individual nodes to use a customized instance of the view mode layouts available for the content type.
Why this module exists
The existing 'View mode per node' option allows you to choose predefined viewmodes on a per-node basis, but any customizations on a per-node basis would require the user to create an additional Display Suite view mode, enable it for custom layouts on the 'Manage Display' tab for the node's content type, customize the field layouts/settings for the new view mode, and assign it to the node in the 'Display settings' fieldset/tab on the node's edit form.
While this will work, it quickly becomes an administrative nightmare. Here's a comment from the Display Suite issue queue (see http://drupal.org/node/1126360#comment-4343428) that summarizes the need that this module attempts to address:
"I did enable that extra feature [the 'View mode per node' option] and it is a good start...but I'm already needing to allow my users to choose between 1, 2, and 3 column layouts...so any field reordering would have to be done separately in each of these. Given that I need about 4-5 combinations of field orders, that means making 12-15 different view modes per content type. If I have to do this for 3-5 different content types...it gets crazy."
What this module does
This module creates a 'Manage Layout' tab for nodes of any content types enabled on the module's configuration page. Now, we just define all our 'parent' custom view modes and layouts in the standard Display Suite way, assign one of them to the node (in the 'Display settings' fieldset/tab on the node's edit form), and navigate to the 'Manage Layout' tab to create and apply a customized 'child' view mode/layout for this node.
All administration is then handled at the node level, and leaves the Display Suite view mode listings uncluttered, as they only need to list the 'parent' view modes.
If an unwanted customization is made, we simply click the 'Reset Layout' button and revert that particular node back to the parent view mode/layout.
Module Dependancies
Drupal 7 Core
Display Suite -- http://drupal.org/project/ds
Optional Modules
Field Collection -- http://drupal.org/project/field_collection
Installation Instructions
- Enable the Display Suite module, and it's included DS Extras submodule.
- Enable Display Suite Custom Node Layouts module.
- Configure module permissions as required at /admin/people/permissions
Configuration/Usage
- Choose which content types you'd like to enable custom node layouts for at /admin/structure/ds/view_modes/ds_custom_node_layouts
- Enable the 'View mode per node' option in the 'Other' tab at /admin/structure/ds/extras
- Navigate to the Manage Display Tab (/admin/structure/types/manage/YOUR_CONTENT_TYPE/display) for the content type(s) you enabled in step 1. Find the 'Custom display settings' fieldset/tab, and enable custom display settings for the desired view modes (either core view modes such as 'Full Content', or any custom view modes created through Display Suite, which can be added at /admin/structure/ds/view_modes).
- Navigate to the Manage Display Tab(s) for the view mode(s) specified in step 3 and set the 'default/parent' layouts to use for this content type when that view mode is selected (This is all standard Display Suite configuration -- you will later be able to alter this layout on a per-node basis, which is what this module does)
- **Important** You must enable a view mode other than 'Default' in the 'Display settings' fieldset/tab on the edit form (/node/NID/edit) for the node in order to manage the layout.
- Click the 'Manage Layout' tab for the node (or navigate to /node/NID/view_mode_layout). Make any desired changes, dragging and dropping fields and managing their label and formatting settings as desired (including custom Display Suite fields or Field Collections from the Field Collection Module at http://drupal.org/project/field_collection)
- Click the 'Save Layout' button at the bottom of the page to activate this new custom layout for this node, and you should see your changes take effect.
- To upated an existing custom layout, return to the 'Manage Layout' tab, make any desired changes, and click the 'Update Layout button' at the bottom.
- To revert back to the default 'parent' view mode which was used as the basis/starting point for your customizations, navigate to the 'Manage Layout' tab again, and click the 'Reset Layout' button.
Thanks
Project information
- Project categories: Content editing experience, Content display
- Created by clint.beacock on , updated


