Sunday, August 5, 2012

How to Load image from theme to Template in Liferay


#set ($Image_path = $request.get("theme-display").get("path-theme-images"))

<img src= "$Image_path/foldername/imagename"/>
 
Note : foldername - if you have any folder in images folder with in
       the '_diffs' folder of your theme then it is required.
 
       imagename - Name of your image ex welcome.png etc.
 
Another way :-
 
<img src= "${themeDisplay.pathThemeImages}/foldername/imagename"/> 
 
 

No comments:

Liferay DXP JNDI Data Source Cofiguration

 This Blog will help us to learn about the JNDI Data Source Configuration in Liferay DXP. We have tested this with Liferay 7.3 with Tomcat. ...