Fórum

Liferay 7 Hook

Pranav Parmar, modificado 7 Anos atrás.

Liferay 7 Hook

New Member Postagens: 10 Data de Entrada: 27/07/16 Postagens Recentes
I read documentation about "overriding core jsps in liferay 7" and I followed steps but when I deploy that it just overwrites original login.jsp, I want to original login.jsp as it is and need to do some change in that.
Any suggestion where I got wrong?

Here is my bnd.bnd

Bundle-Version: 1.0.0
Fragment-Host: com.liferay.login.web;bundle-version="1.0.5"
-sources: true

I am using Liferay IDE 3.0.1 and liferay-ce-portal-7.0-ga2

I left META-INF/resources/login.jsp blank
I have attached my login.jsp's screen shot after deployment.
thumbnail
Marco Endres, modificado 7 Anos atrás.

RE: Liferay 7 Hook

Regular Member Postagens: 112 Data de Entrada: 22/08/12 Postagens Recentes
Hello Pranav

Why you dont copy the original JSP and make an include in one of your one files? When you want to change a jsp you need the original and then change it up. If you let it blank there will be an empty login-portlet. You can find the original file on GitHub.

Maybe you should also read this article.

https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/overriding-a-modules-jsps

Marco Endres
Pranav Parmar, modificado 7 Anos atrás.

RE: Liferay 7 Hook

New Member Postagens: 10 Data de Entrada: 27/07/16 Postagens Recentes
Hello Marco,

Thank you for giving answer in such short time.
I tried the way you suggested,it works also.But ,Is there any way to implement hook in Liferay 7 ??And if there is please share.
thumbnail
Marco Endres, modificado 7 Anos atrás.

RE: Liferay 7 Hook

Regular Member Postagens: 112 Data de Entrada: 22/08/12 Postagens Recentes
Which type of hook do you mean?

You can hook a JSP like you did, but you can also modify things in java.

Maybe you find a hook that fits you in this repository:

https://github.com/liferay/liferay-blade-samples
Pranav Parmar, modificado 7 Anos atrás.

RE: Liferay 7 Hook

New Member Postagens: 10 Data de Entrada: 27/07/16 Postagens Recentes
Hello Marco,

I want to hook login.jsp and want to do some changes .When I copy whole login.jsp from Git Hub I cant not able to perform changes in that because login.jsp contains some internal classes of Liferay which are not part of public API. So,only way left to change login.jsp is through Hook.

Here, I just want hook login.jsp.So my question is how that can be achived.
Also I checked bladeSamples and tries to create that with Liferay IDE but its not working .
thumbnail
Marco Endres, modificado 7 Anos atrás.

RE: Liferay 7 Hook

Regular Member Postagens: 112 Data de Entrada: 22/08/12 Postagens Recentes
Hello Panrav

If you make a JSP-Hook, it replaces the original JSP. This means if you take the original JSP and deploy it there should be no difference. Even if it can't resolve the dependencies in de IDE, because on the Portal he can resolve it. He can't resolve it because in the hook you have only 1 or 2 files.
sedki jdaida, modificado 7 Anos atrás.

RE: Liferay 7 Hook

Junior Member Postagens: 25 Data de Entrada: 08/09/16 Postagens Recentes
i want to overide the page of create account . I don't find the page of create_account in liferay 7.
And thanks for advance.
thumbnail
Marco Endres, modificado 7 Anos atrás.

RE: Liferay 7 Hook

Regular Member Postagens: 112 Data de Entrada: 22/08/12 Postagens Recentes
https://github.com/liferay/liferay-portal/blob/master/modules/apps/foundation/login/login-web/src/main/resources/META-INF/resources/create_account.jsp