Only run XbTwigExtension inside XBPreviewRenderer

Created on 13 January 2025, 3 months ago

Overview

📌 Add HTML comments to twig output to attempt to allow in-place editing Active added HTML comments to Twig output, to enable certain XB capabilities without interfering with CSS.

Leverage HTML comment annotations, remove wrapping div elements Active expands on this.

But they result in output like

<!-- xb-start-acf26597-72a4-4833-9cef-97250646576f -->

<div id="block-acf26597-72a4-4833-9cef-97250646576f" class="site-branding block block-system block-system-branding-block">
  
    
    <div class="site-branding__inner">
              <div class="site-branding__text">
        <div class="site-branding__name">
          <a href="/" title="Home" rel="home">XB</a>
        </div>
      </div>
      </div>
</div>
<!-- xb-end-acf26597-72a4-4833-9cef-97250646576f -->

Even for the anonymous user!

Proposed resolution

Make XbTwigExtension only take effect in the context of rendering an XB preview, i.e. when executed by \Drupal\experience_builder\Render\MainContent\XBPreviewRenderer

User interface changes

📌 Task
Status

Active

Version

0.0

Component

Page builder

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

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