I went through Liferay documentation and many other tutorials. But I am still struck with getting my requirement done.
This is what I need to achieve: 1.)Create new custom button or a link(href) in Wiki (built in) Portlet (anywhere in the portlet) 2.)On clicking of that button, I want to open a new jsp page in that portlet only.
This is What I did: I created a Liferay-hook project and selected /wiki/view.jsp to customize. Added a button by :
<liferay-ui:icon image="history" label="<%= true %>"
message="Notify Users" method="get"
url=<%="/c/portal/sample"%>" />
This is my liferay hook.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.1.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_1_0.dtd"><hook><custom-jsp-dir>/META-INF/custom_jsps</custom-jsp-dir>
<struts-action>
<struts-action-path>/wiki/testing</struts-action-path>
<struts-action-impl>
com.liferay.sample.hook.action.WikiEmailHandlerAction
</struts-action-impl>
</struts-action> <struts-action><struts-action-path>/portal/sample</struts-action-path><struts-action-impl>
com.liferay.sample.hook.action.WikiEmailHandlerAction
</struts-action-impl>
Where, WikiEmailHandlerAction is my Java class which extends BaseStrutsPortletAction. When I click on the button "Notify Users", it is opening the new jsp page (but not inside the portlet but as a new page. Liferay Experts, Please let me know how to meet this requirement.