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

What is happening?

The Velocity templates for a theme are in the ${THEME_NAME}/templates/ folder while a Velocity template for web content is saved in the database. How does Liferay know where to find them and how to load them? This logic has been implemented in the Velocity resource listeners. It has been configured in the ${PORTAL_SRC_HOME}/portal-impl/src/portal.properties file as follows:

velocity.engine.resource.listeners=com.liferay.portal.velocity.ServletVelocityResourceListener,com.liferay.portal.velocity.JournalTemplateVelocityResourceListener,com.liferay.portal.velocity.ThemeLoaderVelocityResourceListener,com.liferay.portal.velocity.ClassLoaderVelocityResourceListener

All these listeners, which are separated by commas, inherit from the ...

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