Forums de discussion

update_password url in theme

juan meza, modifié il y a 9 années.

update_password url in theme

Regular Member Publications: 228 Date d'inscription: 06/01/14 Publications récentes
Hi, im having a problem

i have liferay 6.2 GA2, and im trying to get the change password url so i can put it in the theme

is there a way to do this?, if i get the url from the log in portlet, it gives me something like this:
/web/guest/change-password?p_p_id=58&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_58_struts_action=%2Flogin%2Fforgot_password


if i use that, it works... but how can i get it so it is not hardcoded?
how can i do it in the dynamic way?

because i dont know if that will work if liferay is migrated to another server, or something like that


can some one help me?

thank in advance! emoticon
thumbnail
Pankaj Kathiriya, modifié il y a 9 années.

RE: update_password url in theme (Réponse)

Liferay Master Publications: 722 Date d'inscription: 05/08/10 Publications récentes
You can make use of code as shown below:

	#set ($forgot_password_url = $portletURLFactory.create($request, "58", $getterUtil.getLong($plid), "RENDER_PHASE"))
	$forgot_password_url.setParameter('struts_action','login/forgot_password');
juan meza, modifié il y a 9 années.

RE: update_password url in theme

Regular Member Publications: 228 Date d'inscription: 06/01/14 Publications récentes
Thank you! works great!! emoticon

you were just missing a / in the begining of login/forgot_password (or maybe its just for me)... i just added the / and that made it work emoticon

quick question tho... that redirects to the same page im currently in... is there a way to point to another page?
for example:
your code gives me this:
http://localhost:8080/web/guest/bp-theme?p_p_id=58&p_p_lifecycle=0&_58_struts_action=login%2Fforgot_password

i want the same, but just pointing to another page, that is:
http://localhost:8080/web/guest/change-password?p_p_id=58&p_p_lifecycle=0&_58_struts_action=login%2Fforgot_password


how can i do that?
thumbnail
Pankaj Kathiriya, modifié il y a 9 années.

RE: update_password url in theme

Liferay Master Publications: 722 Date d'inscription: 05/08/10 Publications récentes
Get plid of page(layout) Change Password that you have created. And set it as parameter in url just like struts_action.
juan meza, modifié il y a 9 années.

RE: update_password url in theme

Regular Member Publications: 228 Date d'inscription: 06/01/14 Publications récentes
Thank you, works great!!