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

Velocity templates

Apache Velocity is an open source template engine. It permits the users to use a simple yet powerful template language to reference objects defined in the Java code. It is written in 100% pure Java and can be easily embedded into your own applications. Velocity templates help for cleaner code and better maintainability.

Velocity templates control the different HTML of the portal. With the combination of HTML and Velocity you can restructure how the HTML is served.

As explained earlier in this chapter, the following velocity templates are copied from Liferay to your theme's /docroot/templates folder:

  • init_custom.vm: This file allows you to override and define new velocity variables.
  • navigation.vm: This file is called by portal_normal.vm ...

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