As it would be nice to be able to switch the display on each paragraph item, I thought it would be useful to be able to panelize paragraph items. This gives you the opportunity to panelize e.g. the "Default" view mode of a paragraph item and provide several different output layouts (via the panelizer module) users may choose from during content creation.

Because the panelizer module is quite modular and you may provide a panelizer entity plugin to handle this, I wrote an implementation for that and I will provide a patch for this in my next comment.

Hope this may be added to the dev release soon, because this really makes "view mode" switching (in this case panelizer variants) really easy and each panelizer variant may be exported via features module on its own without messing with the field bundle settings variable of a paragraph item if this is exported via features as well.

Cheers

hctom

CommentFileSizeAuthor
#1 panelizer_integration-2420705-1.patch8.97 KBhctom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hctom’s picture

Status: Active » Needs review
FileSize
8.97 KB

Attached is the patch that does the following:

  • Provides and registers the PanelizerEntityParagraphsItem panelizer entity plugin
  • Reworks the administrative paragraphs items table to be able to alter it in hook_page_alter()
  • The provided panelizer entity plugin alter the administrative paragraphs item table to add a panelizer operation

Panelizer also allows custom displays for individual entities. This is currently NOT implemented in the patch, because the paragraph item entities do not have an own page and so it would be hard to implement the corresponding administrative interface. Everything else, the panelizer module provides, should work (providing default panelizer displays, switching between panelizer displays on each individual paragraph item etc.).

jeroen.b’s picture

Status: Needs review » Fixed

Tested and committed to dev. Very cool, thanks!

  • jeroen.b committed 4495fa4 on 7.x-1.x authored by hctom
    Issue #2420705 by hctom: Panelizer integration
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jeroen.b’s picture