Liferay 5.2 Systems Development – Liferay Source, Docs, and more for Theme Developers

For those of you developing themes inside of Liferay, I recommend getting and setting up a vanilla version of the Eclipse IDE, and opening up the Liferay source code as a project. This is really the only way to hop around and inspect the various objects and methods exposed to the portal (and to portal_normal.vm).

Eclipse is here: http://oss.oracle.com/projects/eclipse-member-downloads/dist/files/eclipse35/eclipse-SDK-3.5-win32.zip
Liferay Source is here: http://www.liferay.com/web/guest/downloads/additional

Nothing beats having the source available in Eclipse, since you can quickly and easily hop around the various objects. However, being able to browse the java doc helps, too. It’s available here: http://docs.liferay.com/portal/5.2/javadocs/

Depending on your code base, you may have other variables available to your template files, but the default variables are specified in a file called VelocityVariables.java. Package: com.liferay.portal.velocity (portal-impl/src/). Here is the specific doc on this class: http://docs.liferay.com/portal/5.2/javadocs/portal-impl/com/liferay/portal/velocity/VelocityVariables.java.html

Some additional template variables are defined in the ROOT context theme template: init.vm
liferay-portal-5.2.3tomcat-6.0.18webappsROOThtmlthemes_unstyledtemplatesinit.vm