Foren

Overriding a module's JS files

Soumyashree Mishra, geändert vor 7 Jahren.

Overriding a module's JS files

Junior Member Beiträge: 32 Beitrittsdatum: 18.04.16 Neueste Beiträge
Hi Team,

How to override the javascript files of an existing liferay module?

Regards,
Soumya
thumbnail
Andrew Jardine, geändert vor 7 Jahren.

RE: Overriding a module's JS files

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
I suppose you COULD use a hook (jsp hook) to override them, but I don't think that it's considered good practice. The better approach is probably to define your own AUI module, and if you need functionality from one of the existing AUI modules that Liferay provides, create an object (in your module) and use it. I've done this a couple of times and it's much cleaner than trying to override stuff. The added bonus is that you don't risk breaking something somewhere else in the portal because of a change you made.