[5.1.x] Use grid row components in page.html.twig

Created on 5 January 2025, 16 days ago

Problem/Motivation

Presenter templates must not have markup, only calls to components

page.html.twig is a presenter template with:

  • a call to ui_suite_bootstrap:navbar
  • some hardcoded duplication fo grid row markup

Snippet:

    <div class="row">
      {% if page.header %}
        {% block header %}
          <div class="col col-12 border-bottom mb-4 pb-1">
            {{ page.header }}
          </div>
        {% endblock %}
      {% endif %}
      {% if page.sidebar_first %}
        {% block sidebar_first %}
          <aside class="col col-12 col-sm-3 gx-0" role="complementary">
            {{ page.sidebar_first }}
          </aside>
        {% endblock %}
      {% endif %}

Proposed resolution

Calling grid row component(s) in page template will have those benefits:

  • check if our grid components work well in this real life scenario, and maybe improve or fix them
  • be ready when page displays will be buildable (thanks to page manager, experience builder, or other...)

You may be interested by what was done in https://git.drupalcode.org/project/ui_suite_material/-/blob/2.0.x/templa...

API changes

Maybe some additional props or mechanisms to grid SDC components, but nothing breaking.

📌 Task
Status

Active

Version

5.1

Component

Code

Created by

🇫🇷France pdureau Paris

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