Forums de discussion

Liferay 7, how to create a hook

Irina Russkaya, modifié il y a 7 années.

Liferay 7, how to create a hook

New Member Publications: 2 Date d'inscription: 07/03/16 Publications récentes
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, modifié il y a 7 années.

RE: Liferay 7, how to create a hook

Liferay Legend Publications: 6403 Date d'inscription: 23/09/08 Publications récentes
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, modifié il y a 7 années.

RE: Liferay 7, how to create a hook

New Member Envoyer: 1 Date d'inscription: 08/02/16 Publications récentes
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, modifié il y a 7 années.

RE: Liferay 7, how to create a hook

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
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, modifié il y a 7 années.

RE: Liferay 7, how to create a hook

Regular Member Publications: 138 Date d'inscription: 17/08/15 Publications récentes
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, modifié il y a 7 années.

RE: Liferay 7, how to create a hook

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
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, modifié il y a 7 années.

RE: Liferay 7, how to create a hook

Regular Member Publications: 138 Date d'inscription: 17/08/15 Publications récentes
David H Nebinger:

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


Yes sir that is correct .