Support twig-based rendering for SDCs

Created on 25 August 2025, 2 months ago

Motivation

As outlined in the parent issue, atm we map all SDCs to CE during rendering. However, by default, we would like to render them via twig. Optionally, by some mechanism introduced elsewhere, we can still map component to CE.

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇦🇹Austria fago Vienna

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

Comments & Activities

  • Issue created by @fago
  • @fago opened merge request.
  • 🇦🇹Austria fago Vienna

    A first version is ready. I think we should still extend it to cover testing slots get rendered correctly also, i.e. a twig SDC containing some other twig SDC.

    Then we should test that CE-rendered elements containing twig-SDCs works as expexted.
    As outlined in the parent, the more complex case of twig SDCs containing CE-elements is something for another issue later.

  • 🇦🇹Austria fago Vienna

    added a test case for rendering a layout-SDC with slots using twig-based rendering, that works as expected also

    so now only the more complex case of "CE-rendered elmeents in twig slots" is left, for which we have 📌 XB: Add support for rendering ce-elements in SDC slots Active . This can be tackled when all the rest came together.

    So this MR introduces the helper setSdcCustomElementComponents() for deciding whether a SDC-component is rendered as twig in Drupal or via a custom-element in the decoupled frontend. So according to the plan 📌 First-class experience builder support Active this can be used by the XB-integration to enable CE-rendering for components where we have ce/nuxt-components registered. But this is not part of custom elements, but will have to become its own module or some optional XB-feature.

    Given that the MR should be ready.

  • 🇸🇮Slovenia useernamee Ljubljana

    Passed technical review.

  • 🇸🇮Slovenia useernamee Ljubljana
    • fago committed 35330396 on 3.x
      [#3542959] feat: Support twig-based rendering for SDCs
      
      By: fago
      
  • Now that this issue is closed, please review the contribution record.

    As a contributor, attribute any organization helped you, or if you volunteered your own time.

    Maintainers, please credit people who helped resolve this issue.

Production build 0.71.5 2024