Layout Templates specify how content is arranged on your site pages, as shown in the 1-2-1 Columns layout below:
The Liferay Theme Generator provides a Layouts sub-generator that helps automate layout template creation. This tutorial covers how to use this tool to create layout templates. Install the Liferay Theme Generator if it’s not already installed, then follow these steps to create a layout template:
Open the Command Line and navigate to the folder you want to create your layout template in.
Run The Layouts sub-generator and follow the prompts to create your layout:
Every row consists of 12 sections, so columns can range in size from 1 to 12. Once you’ve entered a value, the generator asks the size you want your row and column to be and presents you with the available width(s).
Choose from the available option(s) with your arrow keys and press Enter to make your selection. Repeat this process for the remaining columns.
The Layouts sub-generator provides the following options for layout templates:
Add a row: Adds a row below the last row.
Insert row: Displays a vi to insert your row. Use your arrow keys to choose where to insert your row, highlighted in blue, then press Enter to insert the row.
- Remove row: Displays a vi to remove your row. Use your arrow keys to select the row you want to remove, highlighted in red, then press Enter to remove the row.
gulp deployto deploy your layout template to the server you specified. If the layout is bundled with your theme, deploy the theme to deploy the layout template.