Currently classes are added using the hook_preprocess_paragarph and this causes problems when using Display Suite on paragraphs.

hook_preprocess_paragarphs is only implemented when the paragraph template is used but it's completely skipped if you use Display Suite on paragraphs.

Move the logic for adding classes to hook_entity_view_alter which is higher up the stack.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ivan Zugec created an issue. See original summary.

Ivan Zugec’s picture

Ivan Zugec’s picture

Status: Active » Needs review

  • Ivan Zugec committed aefa238 on 8.x-1.x
    Issue #2806605 by Ivan Zugec: Add classes using hook_entity_view_alter
    
Ivan Zugec’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

ABaier’s picture

Hey Ivan,

does this fix the problems with paragraphs overridden with display suite layouts? Would be great to have this feature.

Thanks for your help!

NOTE: The module won't work if you're using Display Suite or Panelizer to configure the paragraphs. Integration will come later.

HOG’s picture

This feature doesn't work with the Display suite.