Edit in GitHubLog an issue

Add breakpoints

Adding new breakpoints is as easy as copying and pasting an existing breakpoint from Page Builder's view.xml file (Magento/PageBuilder/etc/view.xml) to the view.xml file in your Admin theme or module, then changing its min-width and max-width as needed.

Example: Create a new breakpoint with a max-width of 320px:

  1. Copy Page Builder's mobile-small breakpoint from Magento/PageBuilder/etc/view.xml.

  2. Paste it into the view.xml file for your Admin theme or module.

  3. Change its name and max-width property.

  4. Change the display options for the products content type as needed.

The options node in step 4 is for the Products content type. This node provides the ideal number of products to show for the breakpoint. In Page Builder's view.xml file, every breakpoint defines options data for the products content type. Your new breakpoint must also define this data, in addition to any other custom data added to the breakpoint.

The following example shows a new breakpoint called mobile-tiny. It's active for viewports with a max-width of 320px, showing only one product at a time (<var name="slidesToShow">1</var>) for both Products appearances (default and continuous):

Copied to your clipboard
<!-- Your view.xml file -->
<var name="mobile-tiny">
<var name="conditions">
<var name="max-width">320px</var>
</var>
<var name="options">
<var name="products">
<var name="default">
<var name="slidesToShow">1</var>
</var>
<var name="continuous">
<var name="slidesToShow">1</var>
</var>
</var>
</var>
</var>
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.