Total Pageviews

Monday, August 29, 2016

Liferay: Understanding theme:defineObjects

In the previous post, we have gone through the implicit objects provided by <portlet:defineObjects/>. In the continuation, today we will go through the implicit objects provided by <theme:defineObjects />.

Similar to <portlet:defineObjects/>, <theme:defineObjects /> is also an empty tag without any attribute, and must be included after the mentioned directive. Lets see the objects:
  1. ThemeDisplay themeDisplay - contains attributes such as groupId, company id, user id, if the user is logged in, etc..
  2. Company company – Portal instance specific information
  3. Account account – current user’s account object
  4. User user – logged in user’s attributes
  5. User realUser – in case of impersonation, gets the logged in user’s id
  6. Contact contact – current user’s contact object
  7. Layout layout – current page attributes
  8. List<Layout> layouts
  9. long plid - current portlet layout id
  10. LayoutTypePortlet layoutTypePortlet – object having information about portlets on the current layout
  11. long scopeGroupId – groupid of the current scope
  12. PermissionChecker permissionChecker – attributes regarding surrent user’s permission
  13. Locale locale – current user’s locale, determined by JVM
  14. TimeZone timeZone – current user’s timezone, determined by JVM
  15. Theme theme – attributes of current theme being rendered on the page
  16. ColorScheme colorScheme – attributes of the current colour scheme of the current theme
  17. PortletDisplay portletDisplay – attributes regarding name, ID, portlet mode etc.
That’s all for today. Thanks for reading and have a nice day.