Liferay Theme Objects For JSPs

When you include the <liferay-theme:defineObjects> tag in your JSP, you gain access to several Liferay theme objects via variables. These objects are described in the table below:

ObjectDescription
accountThe user’s Account object. This object maps to the Account table in the Liferay database.
colorSchemeAn object representing the current color scheme in the theme that is being rendered by the portal
companyThe current Company object. This represents the portal instance on which the user is currently navigating.
contactThe user’s Contact object. This object maps to the Contact table in the Liferay database.
layoutThe page to which the user has currently navigated
layoutTypePortletThis object can be used to programmatically add or remove portlets from a page.
localeThe current user’s locale, as defined by Java
permissionCheckerAn object that can determine—given a particular resource—whether the current user has a particular permission for that resource
plidA portal layout ID. This is a unique identifier for any page that exists in the portal, across all portal instances.
portletDisplayAn object that gives the programmer access to many attributes of the current portlet, including the portlet name, the portlet mode, the ID of the column on the layout in which it resides, and more
realUserWhen an administrator is impersonating a user, this variable tracks the administrator’s User object.
scopeGroupIdBy default, contains the groupId for the community or organization in which this portlet resides. If the scopeable attribute is set to true, this may contain a unique scope identifier for custom scopes, such as the page scope, if the portlet has been configured to use a custom scope.
themeAn object representing the current theme that is being rendered by the portal
themeDisplayA runtime object that contains many useful items, such as the logged-in user, the layout, logo information, paths, and much more
timeZoneThe current user’s time zone, as defined by Java
userThe User object representing the current user

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy