28 December, 2011

Access image from liferay theme

If you want to access any images in liferay from theme,
you can follow below very simple steps:

1) Define the taglib in your portlet jsp file
<%@taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
2)Define the liferay tag like
<liferay-theme:defineObjects />
3)After doing this we would have themeDisplay object available in portlet jsp file 
so you can use
<img src="${themeDisplay.getPathThemeImages}/your_Image_folder/image.png" />
So that's it ... 

Popular Posts

Featured Post

Liferay 7.3 compatibility matrix

Compatibility Matrix Liferay's general policy is to test Liferay Portal CE against newer major releases of operating systems, open s...