Foren

Change Link To My Own Custom User Registration Liferay 6.0.6

thumbnail
Danial Mustofa Habibi, geändert vor 12 Jahren.

Change Link To My Own Custom User Registration Liferay 6.0.6

Regular Member Beiträge: 141 Beitrittsdatum: 01.11.11 Neueste Beiträge
Hi there I want change URL for Create Account in liferay to my own registration page, how to resolve this??


Thank's


Danial
thumbnail
Juhi Kumari, geändert vor 12 Jahren.

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

Expert Beiträge: 347 Beitrittsdatum: 12.12.11 Neueste Beiträge
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, geändert vor 12 Jahren.

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

Liferay Master Beiträge: 875 Beitrittsdatum: 07.01.11 Neueste Beiträge
using hook you can customize above jsp.
thumbnail
Danial Mustofa Habibi, geändert vor 12 Jahren.

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

Regular Member Beiträge: 141 Beitrittsdatum: 01.11.11 Neueste Beiträge
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, geändert vor 12 Jahren.

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

Expert Beiträge: 347 Beitrittsdatum: 12.12.11 Neueste Beiträge
Hi Danial,

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

Regards
Juhi
thumbnail
Danial Mustofa Habibi, geändert vor 12 Jahren.

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

Regular Member Beiträge: 141 Beitrittsdatum: 01.11.11 Neueste Beiträge
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, geändert vor 12 Jahren.

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

Liferay Master Beiträge: 875 Beitrittsdatum: 07.01.11 Neueste Beiträge
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, geändert vor 12 Jahren.

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

Regular Member Beiträge: 141 Beitrittsdatum: 01.11.11 Neueste Beiträge
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, geändert vor 12 Jahren.

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

Liferay Master Beiträge: 875 Beitrittsdatum: 07.01.11 Neueste Beiträge
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, geändert vor 12 Jahren.

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

Regular Member Beiträge: 141 Beitrittsdatum: 01.11.11 Neueste Beiträge
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, geändert vor 10 Jahren.

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

Junior Member Beiträge: 65 Beitrittsdatum: 25.03.10 Neueste Beiträge
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, geändert vor 4 Jahren.

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

New Member Beiträge: 10 Beitrittsdatum: 03.11.17 Neueste Beiträge
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