The attached patch adds a new tab called 'block' under 'display fields' when CCK is enabled. Under block is a listing of all the regions, and if you have fields added to your block nodes, settings for each region. When a node is displayed as a block, it checks the region that the block is being displayed in and sets the appropriate build mode for that region, outputting the fields as you've selected for that node type.

To see what I mean:

  1. Enable CCK
  2. Add a field to a node block content type.
  3. Create a new node block node of that content type.
  4. Enable the block for the node you just created by moving it to a region.
  5. Go to admin/content/node-type/[type]/display/nodeblock (where [type] is the nodeblock content type from which you created a new nodeblock).
  6. Set up display options for your field for the region in which you enabled the block.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zroger’s picture

Status: Needs review » Needs work

I love the direction this is going.

The one problem I encountered is when using an admin theme, the list of regions are for the admin theme, not the site default theme. This could also present a problem for sites using multiple themes in the front-end as well.

There is also a slight UI problem when using a theme with many regions. The horizontal scrolling on the display fields form is a little much.

Great start. Lets figure out how to get this to work properly.

q0rban’s picture

Good point, hadn't thought of that.

Ok, try this on for size then. Adds a setting page to specify which regions for each theme should be available as CCK build modes.

rjmackay’s picture

Seems this has been abandoned.. Any action on this or something similar?
I'd really like to be able to use display suite build modes for node blocks.

I'll try rerolling the patch with the current branch head.

rjmackay’s picture

Status: Needs work » Needs review
FileSize
5.43 KB

Rerolled patch attached. Working with latest 6.x-1.x-dev branch

rjmackay’s picture

Adding a -p0 patch so I can use this with drush_make too (but use the patch in #4 with git)

rjmackay’s picture

Here's another patch. Also adding a default block build mode, this is used for any region that doesn't have a specific build mode.

michaellander’s picture

rjmackay,
Thank you for your recent submissions both on this issue and the others. I was added as a maintainer a few days ago to get the Drupal 7 version up and running, however I'll try to find time in the next week to get these drupal 6 changes rolled in. Can you mark any of your own or others that you have RTBC'd and i'll go in and test them and then roll them into the dev branch after testing?

Thanks again for your help.

rjmackay’s picture

Status: Needs review » Reviewed & tested by the community

Thanks.
This is in use on a client site so definitely getting tested :)

mrfelton’s picture

Patch in #6 is working great for me. In use on production sites.

mrfelton’s picture

Status: Reviewed & tested by the community » Needs work

I'm having a problem with this using it with multiple themes. The config page lets me select the regions that I want build modes for for each theme, and I see them listed in the display suite layout page, but they dont seem to be taking effect.

EDIT: For the default theme, it does seem to take effect, but for other themes, the default 'block' build mode seems to override the one that I set in display suite.