Liferay 6: Where is created ThemeDisplay?

In Liferay the object “ThemeDisplay” is kind of a god-object, it contains a lot of fields/methods that might be useful all around the portal.

All the data provided by this object is not especially related to Liferay themes, so if you are looking for a specific piece of data you should at least give a look to that object. You might find what you want in it.

Init of the ThemeDisplay instance

It could be useful to know how this god-object is generated, all the source code is available in the class, method initThemeDisplay.

ThemeDisplay in JSP

<liferay-theme:defineObjects />

(source of the tag: com.liferay.taglib.theme.DefineObjectsTag)

ThemeDisplay in Java controller

ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(

ThemeDisplay in Velocity (VM)


(added in Velocity context from this class: com.liferay.portal.velocity.VelocityVariablesImpl)

ThemeDisplay in Freemarker (FTL)


(added in Freemarker context from this class: com.liferay.portal.freemarker.FreeMarkerVariablesImpl)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.