Theme Generator

The Liferay Theme Generator generates themes for Liferay DXP. It is just one of Liferay JS Theme Toolkit’s tools.

A couple versions of the Liferay Theme Generator are available. The version you must install depends on the version of Liferay DXP you’re developing on. The required versions are listed in the table below:

Liferay VersionLiferay Theme Generator VersionCommand
6.27.x.xnpm install -g generator-liferay-theme@^7.x.x
7.07.x.x or 8.x.xSame as above or below
7.18.x.xnpm install -g generator-liferay-theme@^8.x.x
7.29.x.x`npm install -g generator-liferay-theme

Sub-generators

The Liferay Theme Generator includes the sub-generators listed in the table below:

Sub-generatorCommand to runDescription
Layoutsyo liferay-theme:layoutGenerate layout templates with an interactive VIM.
Themeletsyo liferay-theme:themeletCreate small, reusable, pieces of CSS and HTML for your themes.

Layouts Sub-generator

The Layouts sub-generator provides the controls to create a layout template that meets your needs. You can add and remove rows and columns on-the-fly as you require. See Generating Layout Templates for more information.

Themelets Sub-generator

Themelets are small, extendable, and reusable pieces of code. They only require the CSS and/or JavaScript files that you want to add to your theme. This modular approach reduces the need for duplicated code across themes and makes it easy for developers to share code snippets with other developers. Themelets are applicable for changes both small and large, from modifying the appearance of an individual piece of UI to adding new features. If there is something you have to manually code for every theme you create, it’s a good candidate for a themelet. See Generating Themelets for more information.

While you can create themes using the tools you prefer, the Liferay Theme Generator is designed with theme development for Liferay DXP in mind. Its toolset and features help streamline theme development.

« Upgrading Your Maven Build EnvironmentInstalling the Theme Generator and Creating a Theme »
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0