- Issue created by @devanbicher
- πΊπΈUnited States devanbicher
Here is my patch to add the above functionality.
Note I am checking that a paragraph is a layout paragraph with the following code:
$behaviors = $paragraph->getAllBehaviorSettings(); $is_layout = isset($behaviors['layout_paragraphs']) && (count($behaviors['layout_paragraphs']) > 2);
If there is a cleaner or preferred way to check that a paragraph is a layout paragraph, please let me know and I can update my patch.
- First commit to issue fork.
- Merge request !75Issue #3463624: Allow ME templates without layouts to be placed at max nesting depth. β (Merged) created by sethhill
- πΊπΈUnited States sethhill
@devanbicher, your patch worked and resolved the issue. I made a slight modification to specifically look for the layout key within the behaviors array, so that if for some reason in the future another element is added into the array it won't cause this to evaluate as true.
$is_layout = isset($behaviors['layout_paragraphs']) && array_key_exists('layout', $behaviors['layout_paragraphs']);
MR!75 makes this change and I've also attached a new patch file. Marking as RTBC.
-
sethhill β
committed d18d7d20 on 2.1.x
Issue #3463624 by sethhill, devanbicher: Allow Templates without layouts...
-
sethhill β
committed d18d7d20 on 2.1.x
-
sethhill β
committed d18d7d20 on 2.2.x
Issue #3463624 by sethhill, devanbicher: Allow Templates without layouts...
-
sethhill β
committed d18d7d20 on 2.2.x
Automatically closed - issue fixed for 2 weeks with no activity.