Foren

Liferay 7, how to create a hook

Irina Russkaya, geändert vor 7 Jahren.

Liferay 7, how to create a hook

New Member Beiträge: 2 Beitrittsdatum: 07.03.16 Neueste Beiträge
Hi,

what is the recommended way to create a hook in Liferay 7?

I have Liferay 7.0 CE GA1, Eclipse Mars.2 Release (4.5.2) + Liferay Plugins. In IDE there is only an option to create a liferay module project . I couldn't find any option for creating a liferay plugin of type "hook" (as earlier for Liferay 6.2). Unfortunately couldn't find any really helpful info

Thanks
thumbnail
Olaf Kock, geändert vor 7 Jahren.

RE: Liferay 7, how to create a hook

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
Irina Russkaya:
what is the recommended way to create a hook in Liferay 7?


Welcome to the Liferay Forums.

A hook used to be the way to extend Liferay's core - a component that is dramatically shrinking in Liferay 7. You should instead write an OSGi module and deploy it. The draft documentation can already be found on dev.liferay.com - which module/bundle/component you'll have to write depends on the type of change that you'd like to introduce. You'll find a lot of samples in the blade repository.
thumbnail
Roberto Zenobio, geändert vor 7 Jahren.

RE: Liferay 7, how to create a hook

New Member Beitrag: 1 Beitrittsdatum: 08.02.16 Neueste Beiträge
Hi All,

I'm working with Liferay 6.2 EE but now i want to use Liferay 7 CE for my new portal.

I have many problems with the new IDE and with the documentation, very fragmentally and insufficient to answer to my questions.

I Can create a Hook Project with Liferay 7 CE and IDE 3.0? If Yes, how?

Thank you!
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Liferay 7, how to create a hook

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Sort of?

Hooks under 6.2 were the only way to override jsps or portal logic.

In the new OSGi world of Liferay 7 CE, the hooks of old are actually now just OSGi modules that register appropriate classes correctly. Even JSP hooks are no longer used, now you create JSP bundle fragments that will be replaced at runtime.

As to how, well it's really going to depend on what you need to do.
abhishek kumar, geändert vor 7 Jahren.

RE: Liferay 7, how to create a hook

Regular Member Beiträge: 138 Beitrittsdatum: 17.08.15 Neueste Beiträge
Irina Russkaya:

what is the recommended way to create a hook in Liferay 7?


In liferay 7 that i did , configure with liferay plugin sdk 7 , If it is been configured properly then follow the previous steps likewise in liferay 6.2 .
In configuration for liferay plugin sdk 7 build.properties file is there modified it with respect to tomcat , i did same things then it can take easily the plugin sdk . if any issue you will face kindly let me know . PFA of build.properties file , after changed in build.properties file and clean the server and download this jar file also ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT and put it in ivy folder in plugin sdk 7 .

Regards
Abhishek
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Liferay 7, how to create a hook

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
abhishek kumar:
Irina Russkaya:

what is the recommended way to create a hook in Liferay 7?


In liferay 7 that i did , configure with liferay plugin sdk 7 , If it is been configured properly then follow the previous steps likewise in liferay 6.2 .


That is one way to do it, Abishek, but it is certainly not the recommended way.
abhishek kumar, geändert vor 7 Jahren.

RE: Liferay 7, how to create a hook

Regular Member Beiträge: 138 Beitrittsdatum: 17.08.15 Neueste Beiträge
David H Nebinger:

That is one way to do it, Abishek, but it is certainly not the recommended way.


Yes sir that is correct .