O'Reilly logo

Liferay User Interface Development by Frank Yu, Xinsheng Chen, Jonas X. Yuan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a FreeMarker template theme

The default templates are Velocity templates in the Liferay themes. This can be verified by looking at the following highlighted line in the ${PLUGINS_SDK_HOME}/themes/build-common-theme.xml file:

<if>
<not>
<isset property="theme.type" />
</not>
<then>
<property name="theme.type" value="vm" />
</then>
</if>

Liferay engineers can now create a theme with FreeMarker templates in Liferay portal. To create a FreeMarker theme, we need to update the theme type to FreeMarker. This can be done by following the procedure given next:

  1. In the ${liferay.plugins.sdk.home}/themes/ folder, run the following command:
    create.bat|./create.sh] freemarker "FreeMarker Theme"
    
  2. Add a theme.type line in the ${PLUGINS_SDK_HOME}/themes/freemarker-theme/build.xml ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required