Legacy Knowledge Base
Published Jul. 2, 2025

How can I configure a grid with 3 modules but displaying 2 modules per row in tablet mode?

Written By

Jorge Diaz

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

We have created a content page that contains a grid with 3 modules and it displays 3 modules per row in desktop mode.

We need to only display 2 modules per row in tablet mode but Liferay doesn't allow configuring 2 Modules per Row, this option is not displayed in the Style drop-down when you have 3 modules.

Why does this limitation exist? Is there any workaround?

Environment

  • Liferay DXP 7.3
  • Liferay DXP 7.4

Resolution

  • What is the solution? Be clear, concise, correct

Additional Information

Configuring 2 modules per row when having a 3 module grid is not allowed because you cannot distribute 3 Modules in 2 rows with 2 modules per row as you will have an empty space.

As a workaround, if you don't mind having an empty space, you can configure it by following these steps:

  1. Create only 1 grid with 6 modules.
  2. For desktop mode, define 3 modules per row.
  3. For tablet mode, define 2 modules per row.
  4. Add the desired content only to the initial 3 modules, leaving the other 3 empty.

This option will allow displaying the desired columns in each desktop/tablet mode.

There is a small drawback: there will be empty div containers (the remaining empty modules), but that should have no impact on the UI

 

 

Did this article resolve your issue ?

Legacy Knowledge Base