Liferay DXP 7.0 theme templates and the new DXP version theme templates are essentially the same. Here are the main changes:
Key reasons for using FreeMarker templates and removing Velocity templates are these:
FreeMarker is developed and maintained regularly, while Velocity is no longer actively being developed.
FreeMarker is faster and supports more sophisticated macros.
FreeMarker supports using taglibs directly rather than requiring a method to represent them. You can pass body content to them, parameters, etc.
If you haven’t converted your Velocity theme templates to FreeMarker, you must convert your Velocity theme templates to FreeMarker now.
The gulp upgrade
command reports the required theme template changes in the
log. For example, here is the gulp upgrade
log for the Westeros Bank theme:
----------------------------------------------------------------
Liferay Upgrade (7.0 to 7.1)
----------------------------------------------------------------
Renamed aui.scss to clay.scss
File: footer.ftl
Warning: .container-fluid-1280 has been deprecated. Please use
.container-fluid.container-fluid-max-xl instead.
File: portal_normal.ftl
Warning: .navbar-header has been removed. This container should be
removedĀ in most cases. Please, use your own container if necessary.
The log warns about removed and deprecated code and suggests replacements when applicable. For reference, the main changes between Liferay DXP 7.0 themes and the new DXP version themes appear below:
List items inside a container with the list-inline
class
now require
the list-inline-item
class.
The container-fluid-1280
class has been deprecated. Please use
container-fluid container-fluid-max-xl
instead.
Responsive navbar behaviors
are now applied
to the navbar
class via the required navbar-expand-{breakpoint}
class.
The navbar-toggle
class is now navbar-toggler
and
has different inner markup.
The navbar-header
class has been removed. This container should be removed
in most cases. Please, use your own container if necessary.
In this section you’ll learn how to update various theme templates to the new DXP version.