Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Lari Tuominen
Hooks
October 30, 2008 11:35 PM
Answer

Lari Tuominen

Rank: Expert

Posts: 283

Join Date: November 7, 2007

Recent Posts

Hi all,

I have read some documentation related to Liferay hooks and it looks really nice ;) However I have few questions on how to create a hook and when should I use hooks instead of modifying Liferay ext.

1. All the examples and blog posts that I have read start from the fact that the hook project have already been created and actually they only show how to use simple hook. Starting from the scratch it would be nice to know how to create a hook - meaning that Plugins SDK has a folder for hooks. If one wants to create a portlet, the method is to run ./create.sh, etc, with correct parameters and baseline for portlet is created. How this can be achieved with hooks?

2. I have seen wol-portlet example that obviously utilizes hooks. Can I create a hook that has nothing to do with portlets. For instance if I would like to add some logic to liferay portalt startup - can I do it with hooks?

If someone can answer these questions, I can try it out and improve Liferay's wiki related to hooks.

PS: here's current information on wiki about hooks: http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Portal+Hook+Plugins

- Lari
Mark Doerr
RE: Hooks
October 31, 2008 8:47 AM
Answer

Mark Doerr

Rank: Junior Member

Posts: 25

Join Date: July 14, 2008

Recent Posts

The same content that Lari found in the wiki is also in a Blog by (I think) Ray Agué.

There are some helpful comments to that article, but it still seems like not enough documentation to go to work with. Is there a more in depth discussion coming soon?
NIKHIL DIXIT
RE: Hooks
April 27, 2012 12:34 AM
Answer

NIKHIL DIXIT

Rank: New Member

Posts: 1

Join Date: April 27, 2012

Recent Posts

Facing stackoverflow exception after creating a hook to override the jsp.
Please help
David H Nebinger
RE: Hooks
April 27, 2012 6:05 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7156

Join Date: September 1, 2006

Recent Posts

First do not revive a dead thread w/ a new question - post it as a new thread.

Second, unless you're going to provide some info (i.e. the stack trace), don't expect much help. There is absolutely nothing in your post that we could use to assist.