Default values for slot

Created on 11 December 2024, 4 months ago

Problem/Motivation

default values for slot

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Feature request
Status

Active

Version

11.0 🔥

Component

single-directory components

Created by

🇦🇺Australia griffynh Sydney

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

Comments & Activities

  • Issue created by @griffynh
  • 🇫🇷France pdureau Paris

    I guess this feature is expected by Experience Builder in order to fill the newly added component with initial data without having to rely on the unreliable examples property.

    default must not be used in the rendering process (sending default value if slot value is missing or empty) because:

    • sometimes we want a default value in the display builder while allowing the user to set empty or missing value instead
    • Twig has already mechanisms to handle default value logic:
      • |default() when the slot is not a block
      • the block children nodes when the slot is a block
Production build 0.71.5 2024