Leveraging the Current Theme with Liferay Faces Portal

Liferay Faces Portal provides access to the Liferay ThemeDisplay object and the current theme’s images.

Liferay Faces Portal provides the LiferayFacesContext.getThemeDisplay method for accessing the ThemeDisplay Java object and the liferay.themeDisplay exception language (EL) variable for accessing the object in Facelets.

Additionally, Liferay Faces Portal provides the liferay.themeImagesURL and liferay.themeImageURL Facelet EL variables for gaining access to theme image URLs. You can use these URLs as attribute values for Facelet composite component tags, like the liferay-ui:icon tag. The liferay-ui:icon tag encapsulates an HTML img tag whose src attribute can be set to a fully qualified URL of an icon image in the current Liferay theme.

By using some of these features, you’ll be able to access the current Liferay theme and its images.

Related Topics

Themes and Layout Templates

Understanding Liferay Faces Portal

Liferay Faces Alloy UI Components

Liferay Faces Bridge UI Components

0 (0 Votes)
Contexts and Dependency Injection for JSF Portlets Previous