For the layout paragraphs builder we need to detect, if we're currently in edit or output mode, so that the theme can react on that correctly.
For that reason we have:
/**
* Implements hook_preprocess_HOOK().
*/
function drowl_paragraphs_bs_type_layout_slideshow_preprocess_layout(&$variables) {
// Layout Paragraphs module support:
if (\Drupal::service('module_handler')->moduleExists('layout_paragraphs')) {
// Ensure each layout_paragraphs builder region is rendered, even if empty:
// @see https://www.drupal.org/project/drowl_layouts_bs/issues/3294075
if (!empty($variables['layout'])) {
$defaultRegion = $variables['layout']->getDefaultRegion();
$hasDefaultRegion = !empty($defaultRegion);
$isLayoutParagraphsBuilder = $hasDefaultRegion && !empty($variables['content'][$defaultRegion]['#attached']['drupalSettings']['lpBuilder']);
if ($isLayoutParagraphsBuilder) {
// This is a layout paragraphs builder (edit mode).
// Set a layout twig variable to implicate we need to force rendering
// empty regions:
$variables['drowl_paragraphs_is_layout_paragraphs_builder'] = TRUE;
}
}
}
https://git.drupalcode.org/project/drowl_paragraphs_bs/-/blob/1.0.10/mod...
Translating content with a drowl_paragraphs_bs_type_layout_slideshow paragraph, we saw that Slick was wrongly initialized in the backend, so that scrolling was impossible.
drowl_paragraphs_is_layout_paragraphs_builder
was FALSE in the translation form, while it was true when editing in the original language.
The reason seems to be that our condition doesn't reliably work for translated content.
The same issue also can be reproduced in drowl_paragraphs:
See above.
Check the edit mode independently from language.
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.