JSP Hook
Overriding portal JSP
Implementing Hook is an easy way to
modify existing portal source, here we can see how to modify a jsp. if we want
to do some changes or modification in any
of the existing or Out-Of-The-Box portlet, we can go for jspHook.
For example:
In ‘Document_Library’, if we want
to do some modification or some changes or if you want to
give any information in that portlet we can go for view.jsp or some
other relevant jsp (it is in
webapps/root/html/portlet/document_library/view.jsp)
How to create the
Hook for JSP?
· Create Project> New > LiferayProject > Project
Name > Select the Plugin HOOK > click on finish
· Right Click
on Project> New > Liferay hook > Select Custom JSP > Click ‘Add From Library’
· Choose any
Portlet (or OTB portlet) from list displayed and select the JSP which need to
modify. Then Finish
· Then Go to
Project. Open the docroot, you will see customjsp folder and can also see the
selected JSP in the folder.
· Then
Deploy in ANT
· Run the
Server
Example: Creating <marquee>
in the Languages portlet
No comments:
Post a Comment