Skip to content

Conversation

msagolj
Copy link

@msagolj msagolj commented Aug 21, 2025

The default columns block only allows you to add default content (text, title , image, link/button) to the different columns.
This PR is an example on how you can style sections as columns so you can add any number and type of blocks/default content to the different column sections.

The code collects all consecutive sections that have style (class) set to column, wraps them in div and styles it as a flexbox.

Sample Output:

image

In the editor the columns are listed on the same level as normal sections. As an additional convenience for the author the selected width is shown in the title of the column:

image

You can add any number of style options as needed by your design to be selected by the author. In this example the author can select the desired width and background color.

image

Test URLs:

@aem-code-sync
Copy link

aem-code-sync bot commented Aug 21, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@msagolj msagolj changed the title Example columns Example: Section Columns Aug 21, 2025
{
"component": "multiselect",
"name": "style",
"name": "Column Style(s)",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably meant to change the label, not the name?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidental change in the wrong model :) reverted

{
"id": "column-section",
"components": [
"text",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not include the filter from the regular section?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to demonstrate that the columns section can have its own set of blocks, and not all blocks fit into a column e.g. hero block.

paths.json Outdated
"/content/aem-boilerplate/:/",
"/content/aem-boilerplate/configuration:/.helix/config.json",
"/content/aem-boilerplate/metadata:/metadata.json"
"/content/columns-example/:/",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the default path mapping.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jup, paths.json shouldn't be part of the PR, sorry. reverted.

@aem-code-sync aem-code-sync bot temporarily deployed to example-columns August 25, 2025 12:12 Inactive
@aem-code-sync
Copy link

aem-code-sync bot commented Aug 25, 2025

Page Scores Audits Google
📱 /drafts/msagolj/columns PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /drafts/msagolj/columns PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@msagolj msagolj marked this pull request as draft August 25, 2025 12:24
@msagolj msagolj requested a review from buuhuu August 25, 2025 13:08
@buuhuu buuhuu changed the title Example: Section Columns Example: Column Layout Aug 25, 2025
@aem-code-sync aem-code-sync bot temporarily deployed to example-columns August 25, 2025 16:28 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants