Theme display in javascript


We know that we can access the themedisplay in java as

ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY)

But how can we access in javascript?

Here we go

Liferay.ThemeDisplay.getScopeGroupId()
Liferay.ThemeDisplay.getCompanyId()
Liferay.ThemeDisplay.getPlid()
Liferay.ThemeDisplay.getLayoutId()

By this we can access the groupId, companyid ... etc

Comments

Post a Comment

Popular posts from this blog

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate