We are currently still building up the English documentation; not all sections have been translated yet. Please note that there may still be German screenshots or links to German pages even on pages that have already been translated. This guide mostly addresses English speaking users in Germany.
Centring content with the OnPage Composer
Your task/initial situation
General information on margins in portlets
The margins of portlets are fixed, i.e. they do not automatically adjust to the screen size of the device on which the online shop is opened. For example, if you enter very high values as margins, this can lead to a lot of white space being displayed on mobile devices. Read the instructions on this page to create centred and responsive content.
Responsively centring content with the OnPage Composer
There are two ways to responsively centre content with the OnPage Composer.
Centring content with the container portlet
- Log in to the back end of JTL-Shop and switch to the front end of JTL-Shop.
- Open the page you want to edit and click the OnPage Composer icon at the top left of the page to open the OnPage Composer for that page.
- In the Portlets tab, in the Layout area, click on the Container tile and add the container to your online shop via drag and drop.
- Click on the pen icon to open the Edit Container dialogue box.
- Activate the Boxed container check box.
- Click Save.
- In the Portlets tab, in the Content area, use drag and drop to add content to the container, such as a heading and an image.
You have successfully created a responsive container with content. You can move this container as required.
Centring content with the grid layout
- Log in to the back end of JTL-Shop and switch to the front end of JTL-Shop.
- Open the page you want to edit and click the OnPage Composer icon at the top left of the page to open the OnPage Composer for that page.
- In the Portlets tab, in the Layout area, click on the Grid layout tile and add the grid layout to your online shop via drag and drop.
- Click on the pen icon to open the Edit Grid Layout dialogue box.
- To centre content, in the General tab, in the Segmentation area, set a segmentation of 3 columns, e.g. 3+6+3.
- Click Save.
- Add the desired content, such as an image, to the middle column of the grid layout portlet.
You have successfully created content using the grid layout portlet. Since you have not added any content to the left and right columns, the content is centred in the middle column. In addition, the column layout automatically adjusts to different screen sizes.