Question about content_attributes prop in radix:page-content component

Created on 23 July 2025, about 2 months ago

I've been spending some time learning about Radix and how things are put together.

Looking at the radix:page-content component, there is a content_attributes prop that is not required, nor is it initialized in the page-content.twig file - this leads me to believe that it is expected to always be passed in to the component. Otherwise, I'd expect to see something like this:

{% set content_attributes = content_attributes ?: create_attribute() %}

Looking at the radix:page component (which includes the radix:page-content component), no value of content_attributes is set. Same goes for page.html.twig (which calls radix:page).

I searched the .theme files and didn't see any mention of it anywhere.

In the radix:page-content component, it is used as follows:

<main{{content_attributes.addClass(page_main_classes)}}>

This leads me to believe that it should be initialized at the top of page-content.twig with

{% set content_attributes = content_attributes ?: create_attribute() %}

Or, am I missing something?

thanks,
-mike

πŸ’¬ Support request
Status

Active

Version

6.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ultimike Florida, USA

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

Comments & Activities

Production build 0.71.5 2024