Mercury Editor to support conditional blocks in preview

Created on 16 November 2023, about 1 year ago
Updated 30 November 2023, about 1 year ago

Problem/Motivation

Currently when conditionally placing blocks on the page based on entity conditions (for example show block only on articles), the block will not appear when it needs to. This is because the iframe preview param is mercury_editor_entity and not the name of the entity as most plugins would assume. This will cause variations in the preview for authors where their editing experience does not match their public experience.

Steps to reproduce

Place a block in a region, only to be viewed on a specific node type. See that in the preview iframe, the block does not render.

Proposed resolution

Change the iframe preview to use the canonical route for an entity controlled by a get param in the URL.

πŸ› Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jnettik Denver, CO

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024