-
Notifications
You must be signed in to change notification settings - Fork 57
Example: Column Layout #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…oilerplate-xwalk into example-columns
…ilerplate-xwalk into example-columns
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
3a6dd1e
to
5f34551
Compare
component-models.json
Outdated
{ | ||
"component": "multiselect", | ||
"name": "style", | ||
"name": "Column Style(s)", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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/:/", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
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 indiv
and styles it as a flexbox.Sample Output:
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:
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.
Test URLs: