Liferay is an amazing open-source project. It’s relatively mature, and gets a lot of love.
The code allows for an awesome separation between front-end engineers, those working on themes and layouts, and portal and portlet developers, those who may be working on adding or improving services. This clean separation is great, but I think it has led to sparse documentation where the two meet. Java developers understand the code. Theme developers understand the presentation. The problem is that theme developers without a solid java background may struggle to understand and fully utilize the power that the Liferay portal offers them.
As a simple example, a question in the community forums as recently as a few weeks ago asks how to obtain request parameters in the theme, or for use within portal_normal.vm.
Here is how you do that:
#set (background_image = $httpUtil.getParameter($portalUtil.getCurrentURL($request), "background")) ##http://www.yoursite.com?parameterName=value #set ($paramValue = $paramUtil.get($request, "parameterName", "Default String Value")) ## $paramValue will print: value
This one-liner sets the velocity variable $background_image to the value of the request URL parameter background. If the URL was http://www.liferay.com/web/guest/home?background=liferay%20rocks!, $background_image = “liferay rocks!”.
The variables $httpUtil, $portalUtil and $request are made available to portal_normal.vm by default, as are countless others.

