Utilize layout preview mode

Created on 9 October 2023, 9 months ago
Updated 11 October 2023, 9 months ago

Problem/Motivation

As a site builder / front end developer, I would like to be able to distinguish layouts displayed on the edit UI from layouts rendered normally.
This would be especially useful if a layout does not display empty regions: if it does so, then on the edit U, it makes impossible to place any components in the corresponding region.

Proposed resolution

Utilize layout preview mode: use PreviewAwarePluginInterface::setInPreview() to mark layouts as being in preview on Layout Paragraphs edit UI.

User interface changes

Nothing.

API changes

Layouts rendered in Layout Paragraphs edit UI are marked as "being in preview", just like on Layout Builder UI, so the in_preview/code> twig variable could be used in layout templates to distinguish preview / non-preview states.

Data model changes

Nothing.

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary huzooka Hungary πŸ‡­πŸ‡ΊπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024