Closed argiepiano closed 2 years ago
After submitting the PR I realized that you are using $classes to also add the modal css classes in that template. Let's put this issue and PR on hold while I take a look at an alternative proposal.
@argiepiano We can adjust that to use the $classes_array
as well, perhaps? That feature is still in alpha and hasn't been formally released.
I'm going to try a few different things now and will report back.
I have been "bitten" in the past by the fact that Entity Plus does not invoke the template_preprocess_xxx for custom entity template files, which is, in my view, at the crux of the problems with Paragraphs, and the reason for imperfect solution of using a #theme_wrappers to force a call of template_preprocess_paragraph_item(). I'm going to try an alternative.
Entity Plus places all custom entity css classes in the variable $classes_array. The template should use that variable, rather than the more limited $classes variable (which only contains one css class: 'entity-plus'). The $classes_array variable contains css classes
entity-paragraphs-item
andparagraphs-item-{bundle}
.This will change the markup from this:
TO THIS:
Making it easier to theme individual paragraph items with css.
This change is the result of the removal of the theme process layer. When porting this module from Drupal, the classes were correctly flattened with implode, BUT the wrong variable was used ($classes). (We will also need to modify the doc block with variables explanations in the template file).
PR coming