Defines a fieldable entity type to be used with Inline entity form and Entity reference, for nested layouts and embedded "special content".

One could do the same or most of this with nodes or any other entity type. But nestedbox, unlike node, is designed to have no unnecessary ballast.

Example:

  1. Create a nested box type "Slider item". Fields: Image, title, link.
  2. Create a nested box type "Slideshow". Fields: Slider items (multiple-value entityreference, target type nestedbox, using inline entity form).
  3. Create a nested box type "Promo box". Fields: Image, title, text, link.
  4. Create a nested boy type "Promo boxes". Fields: Boxes (multiple-value entityreference, target type nestedbox, using inline entity form).
  5. Create a nested box type "Text". Fields: Text (long text with text format).
  6. Create a nested box type "Block". Fields: Block (single-value Block reference).
  7. On the "Page" content type, create a multiple value field "Special elements" (multiple-value entityreference, target type nestedbox, using inline entity form).
  8. Create a new page with a slider, three promo boxes, some longer text in between, and an embedded Views block.
  9. Use display suite and/or entity templates to control the layout. Use Display suite field templates and hook_ds_field_theme_functions_info() to make the slider items show up in slider markup, and the promo boxes to show up as floated boxes next to each other.
  10. Use Features to make a lot of this stuff reusable.

Alternative

Paragraphs
The Paragraphs module follows a similar approach. See also #2227265: Compare paragraphs with nestedbox + inline entity form.

Field collection
It can be used as an alternative to or in combination with Field collection.

Project history

(For a long time the code was only on https://github.com/donquixote/drupal-nestedbox. But since 7.x-1.0 the code is also on drupal.org.)

Supporting organizations: 

Project information

Releases