Liferay Layout Template Generator
Visually build Liferay layout templates with rows and column widths. Exports a Velocity .tpl and liferay-layout-templates.xml for Liferay 6.x and 7.x/DXP.
Template Settings
ID: my_custom_layout · file: my_custom_layout.tpl
Live Preview
Liferay 7.x / DXP · col-md-*col-1 · 8/12
col-md-8col-2 · 4/12
col-md-4Row 1: 12/12
Rows & Columns
Row 1
my_custom_layout.tpl
liferay-layout-templates.xml
About the Liferay Layout Template Generator
A Liferay layout template defines the column structure of a page — the rows and the widths of the portlet columns that content authors drop widgets into. Hand-writing the Velocity .tpl file and its liferay-layout-templates.xml descriptor is fiddly and easy to get wrong. This tool lets you design the grid visually and exports both files, ready to drop into a Liferay module or theme.
Features
- Visual builder: Add rows and set each column's width on Liferay's 12-column grid (e.g.
8/12 + 4/12), with a live preview that updates as you type. - Two export targets: Generate the Velocity
.tpltemplate plus theliferay-layout-templates.xmldescriptor. - 6.x and 7.x/DXP formats: Switch between the Liferay 6.x grid (
span*withrow-fluid) and the modern 7.x/DXP grid (col-md-*withrow), including the matching DTD. - Correct column wiring: Columns are numbered sequentially (
column-1,column-2, …) with the rightportlet-column-first/-last/-onlyclasses and$processor.processColumn(...)calls. - Client-side & private: Everything is generated in your browser — nothing is uploaded.
How to use
- Set a Template Name — the tool derives the
idand.tplfilename automatically. - Pick your Liferay version (7.x/DXP or 6.x).
- Add rows from the presets (e.g.
8 / 4) and fine-tune each column's width. Each row should add up to 12. - Copy or download
{id}.tplandliferay-layout-templates.xml. - Place the
.tplunder/layouttpl/custom/, reference it from the XML, and deploy. Add a matching{id}.pngthumbnail if you want a custom preview in Liferay.