Accessing the image from theme
Some times it may requires to access the image from the theme. So here we go,
view.jsp
<%@taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<liferay-theme:defineObjects/>
<img src="${themeDisplay.getPathThemeImages()}/info.png" />
Here themeDisplay.getPathThemeImages() gets the default image path as (<your theme name> /images)
If you create a custom folder in images folder then you have to give folder name after the themeDisplay.getPathThemeImages().
view.jsp
<%@taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<liferay-theme:defineObjects/>
<img src="${themeDisplay.getPathThemeImages()}/info.png" />
Here themeDisplay.getPathThemeImages() gets the default image path as (<your theme name> /images)
If you create a custom folder in images folder then you have to give folder name after the themeDisplay.getPathThemeImages().
Comments
Post a Comment