Recently I started developing a new theme in Liferay. I had some troubles because I had to display images in the “portal_normal.vm” not only in the “custom.css” by requirements of design.
After looking in several posts and blogs and aiming us to display them in the css file (why we would not do it?) I found an interesting post about Velocity objects.
And now the is an application:
<a href=”#”><img src=”$themeDisplay.getPathThemeImages()/theme/logo.gif” alt=”Logo”></a>
In the “Theme” scenario, we have the “$themeDisplay” variable. We can get the name of the css class, its folder path, the logo name, …
All these variables are in the “init.vm” file in :
{your root\liferay-portal-5.2.3\tomcat-6.0.18\webapps\ROOT\html\themes\_unstyled\templates
Comment