Customizing Liferay Portal with Hooks

Liferay Hooks are the best type of plugin for customizing Liferay’s core features. If possible, use hooks whenever you need to override Liferay’s core functionality. It’s possible to use Ext plugins for many of the same tasks, but hooks are hot-deployable and more forward compatible, so we urge you to use them preferentially.

In this section of tutorials, you’ll learn how to create hooks, and you’ll explore their most common uses.

Creating a Hook Project in the Plugins SDK

Hook plugins are a special type of Liferay plugin that is designed for customizing Liferay in some way. You can do anything from customizing a service, to modifying a core JSP, to changing...

Read More

Overriding Web Resources

Hooks are commonly used to override web resources, found in the portal-web directory of Liferay’s source. You can use a hook to override JSP files, JSPF files, JavaScript files, and images....

Read More

Customizing JSPs by Extending the Original

Let’s say you want to add more content to one of Liferay’s JSPs, but you also want to benefit from any changes made to it as you upgrade Liferay. Rather than overwriting the JSP, you can instead...

Read More

Overriding Language Properties Using a Hook

A language properties hook lets you change Liferay Portal’s messages and labels to suit your needs. For example, you may want to change the title of a Liferay core portlet, a message Liferay...

Read More

Customizing Sites and Site Templates with Application Adapters

JSP hooks are often scoped to the portal, but what if you need to customize specific sites without propagating the customizations throughout the entire portal? You can! Application Adapters are...

Read More

Overriding a Portal Service Using a Hook

Liferay Portal and its core portlets offer a host of services that you can programmatically invoke from local and remote clients. One only needs to look at Portal’s service API or the APIs of its...

Read More

Performing a Custom Action Using a Hook

Hooks are useful for triggering custom actions on common portal events, like user login or system startup. The actions for each of these events are defined in, so you need to...

Read More

Creating Model Listeners

Model Listeners are used to listen for events on models and do something in response. They’re similar in concept to custom action hooks, which perform actions in response to portal events (user...

Read More

Overriding and Adding Struts Actions

Do you want to override Liferay’s Struts actions or add a new Struts action to Liferay? You can do both using Struts action hooks. First, consider the interfaces used for Struts actions:...

Read More

Extending the Indexer Post Processor Using a Hook

Would you like to modify the search summaries, indexes, and queries available in your portal instance? Developing an Indexer Post Processor hook lets you do just that. The indexer hook implements a...

Read More

Supporting Right-to-Left Languages in Plugins

Middle Eastern languages such as Hebrew and Arabic are written right-to-left (RTL). Many sites that use RTL languages are multilingual, requiring both RTL and left-to-right (LTR) content. Modern...

Read More

Creating Plugins to Extend Plugins

For Liferay plugins, you can create a new plugin that extends an existing one. By extending a plugin, you can use all its features in your new plugin while keeping your changes/extensions separate...

Read More

Overriding Portal Properties Dynamically

A portal properties hook lets you override a subset of portal properties that define event actions, model listeners, validators, generators, and content sanitizers. The liferay-hook-6.2.dtd file...

Read More

Advanced Customization with Ext Plugins

Ext plugins are powerful tools for extending Liferay. Because they increase the complexity of your Liferay instance, you should only use an Ext plugin if you’re sure you can’t accomplish your goal...

Read More
0 (0 Votes)
Implementing Application Display Templates Previous