With the Plugins SDK you can deploy layout templates as plugins, and creating layout templates with Liferay Developer Studio is easier than ever. Let’s call our layout template called Columns 1 4 1.
Using Developer Studio:
-
Go to File → New → Liferay Plugin Project.
-
Enter columns-1-4-1 for the Project name and Columns 1 4 1 for the Display name.
-
Choose whichever build type you prefer (Ant or Maven) and select the appropriate Plugins SDK and Liferay runtime.
-
Select Layout Template as your plugin type.
-
Click Finish.
Using the terminal: Navigate to your Plugins SDK’s layouttpl
folder,
and execute the create script in your terminal. Here’s the generic version of
the create script, followed by operating system-specific commands:
./create.[sh|bat] <project-name> "<layout template title>"
-
Example in Linux and Mac OS X:
./create.sh columns-1-4-1 "Columns 1 4 1"
-
Example in Windows:
create.bat columns-1-4-1 "Columns 1 4 1"
Developer Studio’s New Project wizard and the create scripts generate layout
template projects in your Plugin SDK’s layouttpl
folder. Layout template
project names must end with -layouttpl so when you enter columns-1-4-1 for
the project name, -layouttpl is automatically appended to the project name.