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.

Themes and Layout Templates

Understanding Liferay Faces Portal

Liferay Faces Alloy UI Components

Liferay Faces Bridge UI Components

« Contexts and Dependency Injection for JSF PortletsLeveraging the Portal User's Locale with Liferay Faces Portal »
Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0