Updating 6.2 Theme Templates

Liferay DXP 6.2 theme templates and the new DXP version theme templates are essentially the same. Here are the main changes:

Start by converting your Velocity theme templates to FreeMarker. You can refer to Apache’s FreeMarker documentation for help. Common Liferay DXP FreeMarker variables and macros can be found in FTL_liferay.ftl

The Gulp upgrade task reports the required theme template changes in the log. For example, here are the 6.2 to 7.0 upgrade log and 7.0 to 7.1 upgrade logs for the Lunar Resort theme:

----------------------------------------------------------------
 Liferay Upgrade (6.2 to 7)
----------------------------------------------------------------

File: portal_normal.ftl
    Warning: <@liferay.dockbar /> is deprecated, replace with 
    <@liferay.control_menu /> for new admin controls.
    Warning: not all admin controls will be visible without 
    <@liferay.control_menu />
    Warning: ${theme} variable is no longer available in Freemarker 
    templates, see https://goo.gl/9fXzYt for more information.
[18:57:23] Finished 'upgrade:log-changes' after 5.61 ms
[18:57:23] Finished 'upgrade' after 19 s

----------------------------------------------------------------
 Liferay Upgrade (7.0 to 7.1)
----------------------------------------------------------------

Renamed aui.scss to clay.scss
[19:16:54] Finished 'upgrade:log-changes' after 2.53 ms
[19:16:54] Finished 'upgrade' after 16 min

The log warns about removed and deprecated code and suggests replacements when applicable.

In this section you’ll learn how to update various theme templates to the new DXP version.

Let’s Go