Liferay Site Specific Customization – Application Adapter

For site specific jsp file customizations, Liferay provides a very strong features called application adapter. By default, when we customize the jsp files through the hooks, changes applied globally to all liferay sites.

To restrict jsp customization to specific. Add the following configuration in liferay-hook.xml. redeploy your hook.
<custom-jsp-dir>/META-INF/custom_jsps</custom-jsp-dir>
<custom-jsp-global >false<!–custom-jsp-global >

Now to apply the application adapter to a site. Login to Liferay control panel  => go to site settings => select the application adapter (see below screen shot) =>Saveapplication_adapter

 

Important Notes :

  1. Liferay out of box portlet’s jsps can be customized by application adapter.
  2. Liferay taglib jsps cann’t be customized by application adapter.
  3. if we customizing a jsp file which is referred from other jsp file using include tag. We will have to modify the include statement, append application adapter name in jsp file name. e.g. <%@ include file=”/html/portlet/asset_publisher/init.{APPLICATION-ADAPTER-NAME}.jsp” %>

 

About these ads

One thought on “Liferay Site Specific Customization – Application Adapter

  1. Hi!

    I´m trying to override status.jsp using a hook and application adapter. In my ROOT.war I can see my status.myadapter.jsp, but it is not display. Do I have to override any other page in order to see my status page?

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s