Foros de discusión

Change Link To My Own Custom User Registration Liferay 6.0.6

thumbnail
Danial Mustofa Habibi, modificado hace 12 años.

Change Link To My Own Custom User Registration Liferay 6.0.6

Regular Member Mensajes: 141 Fecha de incorporación: 1/11/11 Mensajes recientes
Hi there I want change URL for Create Account in liferay to my own registration page, how to resolve this??


Thank's


Danial

Archivos adjuntos:

thumbnail
Juhi Kumari, modificado hace 12 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
Hi Danial,

Customize html\portlet\login\navigation.jspf and change this code with custom create account page.
<c:if test="<%= showCreateAccountIcon %>">
				<liferay-ui:icon image="add_user" message="create-account" url="<%= themeDisplay.getURLCreateAccount().toString() %>" />
			</c:if>


Regards
Juhi
thumbnail
Jitendra Rajput, modificado hace 12 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
using hook you can customize above jsp.
thumbnail
Danial Mustofa Habibi, modificado hace 12 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

Regular Member Mensajes: 141 Fecha de incorporación: 1/11/11 Mensajes recientes
Juhi Kumari:
Hi Danial,

Customize html\portlet\login\navigation.jspf and change this code with custom create account page.
<c:if test="<%= showCreateAccountIcon %>">
				<liferay-ui:icon image="add_user" message="create-account" url="<%= themeDisplay.getURLCreateAccount().toString() %>" />
			</c:if>


Regards
Juhi


hi juhi thank's for your answer..I found the way to modify this jsp, i'm using portal plugin pack for netbeans, And i'm using hook plugin, btw what class should i changed if i want modify some of the code or to change the URL?
thumbnail
Juhi Kumari, modificado hace 12 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
Hi Danial,

What code you want to change? You can change URL in jsp itself.

Regards
Juhi
thumbnail
Danial Mustofa Habibi, modificado hace 12 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

Regular Member Mensajes: 141 Fecha de incorporación: 1/11/11 Mensajes recientes
Juhi Kumari:
Hi Danial,

What code you want to change? You can change URL in jsp itself.

Regards
Juhi

sorry if i''m wrong did in portlet if we want to create our own URL we must create some method in portlet class and then call it using portlet:actionURL?? or is there any other way to change the URL itself?
thumbnail
Jitendra Rajput, modificado hace 12 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
There are couple of ways you can generate URL .
One of this is available here.

First get layout object where your custom portlet is deployed.



 Layout layout = LayoutLocalServiceUtil.getFriendlyURLLayout(themeDisplay.getScopeGroupId(),
                    isPrivatePage, "/pageName");



isPrivatePage - If your page is private then pass it as true other wise false.
"/pageName" - Friendly URL of page where portlet is placed.

Once you get this layout object then you can try by using below snippet.


LiferayPortletURL portletURL = PortletURLFactoryUtil.create(PortalUtil .getHttpServletRequest(renderRequest), PORTLET_NAME, layout .getPlid(), PortletRequest.RENDER_PHASE);
portletURL.setWindowState(LiferayWindowState.NORMAL);
portletURL.setPortletMode(PortletMode.VIEW);


PortletRequest.RENDER_PHASE - Pass this as argument if you want to call Render Method .
PortletRequest.ACTION_PHASE - Pass this as a last argument if you want to call any action before render method.

If you want to set any other parameter then setParameter() method.

Hope this helps..!!
thumbnail
Danial Mustofa Habibi, modificado hace 12 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

Regular Member Mensajes: 141 Fecha de incorporación: 1/11/11 Mensajes recientes
Jitendra Rajput:
There are couple of ways you can generate URL .
One of this is available here.

First get layout object where your custom portlet is deployed.



 Layout layout = LayoutLocalServiceUtil.getFriendlyURLLayout(themeDisplay.getScopeGroupId(),
                    isPrivatePage, "/pageName");



isPrivatePage - If your page is private then pass it as true other wise false.
"/pageName" - Friendly URL of page where portlet is placed.

Once you get this layout object then you can try by using below snippet.


LiferayPortletURL portletURL = PortletURLFactoryUtil.create(PortalUtil .getHttpServletRequest(renderRequest), PORTLET_NAME, layout .getPlid(), PortletRequest.RENDER_PHASE);
portletURL.setWindowState(LiferayWindowState.NORMAL);
portletURL.setPortletMode(PortletMode.VIEW);


PortletRequest.RENDER_PHASE - Pass this as argument if you want to call Render Method .
PortletRequest.ACTION_PHASE - Pass this as a last argument if you want to call any action before render method.

If you want to set any other parameter then setParameter() method.

Hope this helps..!!

hi there sorry for asking again...where i should I put the syntax u provide??what class I should modify ?Or Should i just put that syntax in navigation.jsp?I'm using hook. I've tried put the syntax directly on navigation.jsp but. I got many Error..then I've found another way...provide by You again jitendra, in another thread like this
&lt;%
HttpServletRequest httpRequest = PortalUtil.getOriginalServletRequest(request);
httpRequest = PortalUtil.getOriginalServletRequest(httpRequest);
long plids =PortalUtil.getPlidFromPortletId(themeDisplay.getScopeGroupId(),	"portlet_registrasi_WAR_RPLLportlet");
PortletURL portletURL = PortletURLFactoryUtil.create(request, "portlet_registrasi_WAR_RPLLportlet", plids, PortletRequest.RENDER_PHASE);

%&gt;
it works but the problem it always redirect to portal home page....

thank's


Regards

Danial
thumbnail
Jitendra Rajput, modificado hace 12 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
If you want to change this URL to your custom portlet page then create your own action/render URL.

PortletURLFactoryUtil to generate URL
thumbnail
Danial Mustofa Habibi, modificado hace 12 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

Regular Member Mensajes: 141 Fecha de incorporación: 1/11/11 Mensajes recientes
Jitendra Rajput:
If you want to change this URL to your custom portlet page then create your own action/render URL.

PortletURLFactoryUtil to generate URL


so where i can create my own render URL???did I must modify some class ??? Usually if in custom portlet I create my own URL by calling method from my portlet class..what must i do?in this case??
thumbnail
Orin Fink, modificado hace 10 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

Junior Member Mensajes: 65 Fecha de incorporación: 25/03/10 Mensajes recientes
There is a portal-ext.properties entry that can be made rather than adding a hook.

#
# Enter a friendly URL of a page that will be used to create new accounts
# whenever the user clicks the "create account" link in the login portlet.
# This allows providing custom portlets to create accounts. By default, the
# portal's create account will be used.
#
company.security.strangers.url=/create-account
Pradnya Parvatikar, modificado hace 4 años.

RE: Change Link To My Own Custom User Registration Liferay 6.0.6

New Member Mensajes: 10 Fecha de incorporación: 3/11/17 Mensajes recientes
Orin Fink:

There is a portal-ext.properties entry that can be made rather than adding a hook.

#
# Enter a friendly URL of a page that will be used to create new accounts
# whenever the user clicks the "create account" link in the login portlet.
# This allows providing custom portlets to create accounts. By default, the
# portal's create account will be used.
#
company.security.strangers.url=/create-account

Hi  Orin Fink,
Thanks for giving this suggestion. It was really easy method to redirect to our custom registration page  instead of creating a hook and modifying in the navigation.jspf.
Thanks,Pradnya