Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Create-account URL in Velocity template (Liferay 6.1) Thibault Boyeux 19 de febrero de 2012 11:57
RE: Create-account URL in Velocity template (Liferay 6.1) Sandeep Nair 19 de febrero de 2012 22:53
RE: Create-account URL in Velocity template (Liferay 6.1) Thibault Boyeux 20 de febrero de 2012 12:41
RE: Create-account URL in Velocity template (Liferay 6.1) Tanaji Londhe 5 de julio de 2012 23:02
RE: Create-account URL in Velocity template (Liferay 6.1) Sandeep Nair 5 de julio de 2012 23:41
RE: Create-account URL in Velocity template (Liferay 6.1) Tanaji Londhe 6 de julio de 2012 0:33
RE: Create-account URL in Velocity template (Liferay 6.1) Sandeep Nair 6 de julio de 2012 1:11
RE: Create-account URL in Velocity template (Liferay 6.1) Tanaji Londhe 6 de julio de 2012 1:25
RE: Create-account URL in Velocity template (Liferay 6.1) Sylvain Fournier 19 de julio de 2012 10:50
RE: Create-account URL in Velocity template (Liferay 6.1) Pablo Rendón 21 de agosto de 2012 8:16
RE: Create-account URL in Velocity template (Liferay 6.1) Durgaprasad Lagadapati 30 de octubre de 2012 9:20
RE: Create-account URL in Velocity template (Liferay 6.1) parikshit sharma 5 de noviembre de 2012 4:14
RE: Create-account URL in Velocity template (Liferay 6.1) Beppo Ivel 1 de agosto de 2014 1:27
RE: Create-account URL in Velocity template (Liferay 6.1) Sandeep Nair 15 de agosto de 2014 16:06
RE: Create-account URL in Velocity template (Liferay 6.1) Sriram Moola 19 de julio de 2012 22:37
RE: Create-account URL in Velocity template (Liferay 6.1) Sriram Moola 21 de julio de 2012 8:10
RE: Create-account URL in Velocity template (Liferay 6.1) Beppo Ivel 16 de agosto de 2014 7:32
Thibault Boyeux
Create-account URL in Velocity template (Liferay 6.1)
19 de febrero de 2012 11:57
Respuesta

Thibault Boyeux

Ranking: New Member

Mensajes: 12

Fecha de incorporación: 27 de julio de 2009

Mensajes recientes

Hello everyone,

In Liferay 6.1, you can no longer do themeDisplay.getURLCreateAccount() to create a link towards the account creation page in your Velocity theme template.

Indeed, the method has been removed from the ThemeDisplay API.

How could I include this link within my theme Velocity template now that this is not available any longer?

Thank you very much for your help!
Sandeep Nair
RE: Create-account URL in Velocity template (Liferay 6.1)
19 de febrero de 2012 22:53
Respuesta

Sandeep Nair

Ranking: Liferay Legend

Mensajes: 1721

Fecha de incorporación: 5 de noviembre de 2008

Mensajes recientes

Hi,

Can you try like this in your vm

#set ($create_account_url = $portletURLFactory.create($request, "58", $page.getPlid(), "ACTION_PHASE"))
$create_account_url.setWindowState(WindowState.MAXIMIZED);
$create_account_url.setPortletMode(PortletMode.VIEW);
$create_account_url.setParameter("saveLastPath", "0");
$create_account_url.setParameter("struts_action", "/login/create_account");

and then use $create_account_url

Regards,
Sandeep
Thibault Boyeux
RE: Create-account URL in Velocity template (Liferay 6.1)
20 de febrero de 2012 12:41
Respuesta

Thibault Boyeux

Ranking: New Member

Mensajes: 12

Fecha de incorporación: 27 de julio de 2009

Mensajes recientes

Hi Sandeep,

Thank you very much for your precious help. I didin't know one could PortletURLFactory in Velocity (I should have checked the VelocityVariables file, my mistake).

I ended up using this code:

#set ($create_account_url = $portletURLFactory.create($request, "58", $page.getPlid(), "ACTION_PHASE"))
$create_account_url.setWindowState("maximized")
$create_account_url.setPortletMode("view")
$create_account_url.setParameter("saveLastPath", "0")
$create_account_url.setParameter("struts_action", "/login/create_account")


Indeed, Velocity cannot easily retrieve static constants from Java classes (or I don't know how), such as WindowState.MAXIMIZED and PortletMode.VIEW.

It is not optimal to write them directly as strings, but I think the string values of these two constants shouldn't change soon!


Best,
Thibault.
Tanaji Londhe
RE: Create-account URL in Velocity template (Liferay 6.1)
5 de julio de 2012 23:02
Respuesta

Tanaji Londhe

Ranking: Regular Member

Mensajes: 196

Fecha de incorporación: 25 de abril de 2012

Mensajes recientes

Hi,

Liferay 6.1 version does not support "themeDisplay.getURLCreateAccount()" ,so I used following code as it is in my vm file but cant work
#set ($create_account_url = $portletURLFactory.create($request, "58", $page.getPlid(), "ACTION_PHASE"))
$create_account_url.setWindowState(WindowState.MAXIMIZED);
$create_account_url.setPortletMode(PortletMode.VIEW);
$create_account_url.setParameter("saveLastPath", "0");
$create_account_url.setParameter("struts_action", "/login/create_account");

So please anybody tell me link for Create-Account URL for liferay 6.1
Sandeep Nair
RE: Create-account URL in Velocity template (Liferay 6.1)
5 de julio de 2012 23:41
Respuesta

Sandeep Nair

Ranking: Liferay Legend

Mensajes: 1721

Fecha de incorporación: 5 de noviembre de 2008

Mensajes recientes

Dont use WindowState or PortletMode, use the string values directly as

$create_account_url.setWindowState("maximized")
$create_account_url.setPortletMode("view")
Tanaji Londhe
RE: Create-account URL in Velocity template (Liferay 6.1)
6 de julio de 2012 0:33
Respuesta

Tanaji Londhe

Ranking: Regular Member

Mensajes: 196

Fecha de incorporación: 25 de abril de 2012

Mensajes recientes

Hi Sandeep,
I make changes as per your suggestion but generates url this one "http://localhost:9090/create_account_url" , So what is issue i cant find out.

#set ($create_account_url = $portletURLFactory.create($request, "58", $page.getPlid(), "ACTION_PHASE"))
$create_account_url.setWindowState("maximized");
$create_account_url.setPortletMode("view");
$create_account_url.setParameter("saveLastPath", "0");
$create_account_url.setParameter("struts_action", "/login/create_account");

<a href="create_account_url">Register</a>

It throughs exception : 07:25:04,140 INFO [PortalImpl:4873] Current URL /create_account_url generates exception: null



Thanks & regards,
Tanaji Londhe.
Sandeep Nair
RE: Create-account URL in Velocity template (Liferay 6.1)
6 de julio de 2012 1:11
Respuesta

Sandeep Nair

Ranking: Liferay Legend

Mensajes: 1721

Fecha de incorporación: 5 de noviembre de 2008

Mensajes recientes

You havent used the variable in anchor tag properly. Please put $
<a href="$create_account_url">Register</a>
Tanaji Londhe
RE: Create-account URL in Velocity template (Liferay 6.1)
6 de julio de 2012 1:25
Respuesta

Tanaji Londhe

Ranking: Regular Member

Mensajes: 196

Fecha de incorporación: 25 de abril de 2012

Mensajes recientes

Hi Sandeep,

Sorry I forgot to write "$" in vm file. Thanx it works properly.
Sylvain Fournier
RE: Create-account URL in Velocity template (Liferay 6.1)
19 de julio de 2012 10:50
Respuesta

Sylvain Fournier

Ranking: New Member

Mensajes: 1

Fecha de incorporación: 19 de julio de 2012

Mensajes recientes

How do you manage multi language for your label "Register"
Sriram Moola
RE: Create-account URL in Velocity template (Liferay 6.1)
19 de julio de 2012 22:37
Respuesta

Sriram Moola

Ranking: New Member

Mensajes: 2

Fecha de incorporación: 19 de julio de 2012

Mensajes recientes

HI Sandeep,

I've followed your steps in creating account url in velocity template. The url is generating fine, but the problem i'm facing is with a parameter p_p_lifecyle. Below is the url

http://localhost:8080/home?p_auth=1KMIMM5l&p_p_id=58&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_58_struts_action=%2Flogin%2Fcreate_account

It's giving me Sigin is temporarily not available. When i change the p_p_lifecylcle paramter value to 0, it's working fine so can you please suggest me what should i do to set p_p_lifecycle parameter.
Sriram Moola
RE: Create-account URL in Velocity template (Liferay 6.1)
21 de julio de 2012 8:10
Respuesta

Sriram Moola

Ranking: New Member

Mensajes: 2

Fecha de incorporación: 19 de julio de 2012

Mensajes recientes

Hi Guys,

I've found the solution for my issue, using RENDER_PHASE instead of ACTION_PHASE fixed the issue.
Pablo Rendón
RE: Create-account URL in Velocity template (Liferay 6.1)
21 de agosto de 2012 8:16
Respuesta

Pablo Rendón

Ranking: New Member

Mensajes: 8

Fecha de incorporación: 29 de diciembre de 2011

Mensajes recientes

Hello,

I'm trying to get the categories with the link in a VM template, but I can't even make this works, this is what I'm doing:

#set ($create_account_url = $portletURLFactory.create($request, "58", $page.getPlid(), "ACTION_PHASE"))
$create_account_url.setWindowState("maximized");
$create_account_url.setPortletMode("view");
$create_account_url.setParameter("saveLastPath", "0");
$create_account_url.setParameter("struts_action", "/login/create_account");

<a href="$create_account_url">Register</a>

and I have a link like "http://localhost:8080/web/guest/$thisportlet_url"
I think is a problem related with the $page, because when I try to render the $page.getPlid() I just get "$page.getPlid()" instead of the value, I've modified the portal-ext.properties to add "journal.template.velocity.restricted.variables=" but still doesn't work emoticon

any clue what I'm doing wrong?

Thank you!
Durgaprasad Lagadapati
RE: Create-account URL in Velocity template (Liferay 6.1)
30 de octubre de 2012 9:20
Respuesta

Durgaprasad Lagadapati

Ranking: New Member

Mensajes: 10

Fecha de incorporación: 25 de mayo de 2012

Mensajes recientes

Can we use LoginUtil.getURLCreateAccount(request,themeDisplay) as suggested in http://www.liferay.com/community/wiki/-/wiki/Main/Upgrade+6.0+plugins+to+6.1?
parikshit sharma
RE: Create-account URL in Velocity template (Liferay 6.1)
5 de noviembre de 2012 4:14
Respuesta

parikshit sharma

Ranking: Junior Member

Mensajes: 48

Fecha de incorporación: 18 de octubre de 2012

Mensajes recientes

Durgaprasad Lagadapati:
Can we use LoginUtil.getURLCreateAccount(request,themeDisplay) as suggested in http://www.liferay.com/community/wiki/-/wiki/Main/Upgrade+6.0+plugins+to+6.1?


Durgaprasad,
I have checked the LoginUtil class in LR6.1.1 GA2 there is no such method,but if it's about account url for the login user then you can use
"$theme_display.getURLMyAccount()"

in theme .
Beppo Ivel
RE: Create-account URL in Velocity template (Liferay 6.1)
1 de agosto de 2014 1:27
Respuesta

Beppo Ivel

Ranking: Regular Member

Mensajes: 112

Fecha de incorporación: 9 de abril de 2014

Mensajes recientes

I also tried to build a URL but in I use freemarker template. My question is how I get the variable ${page}? If I try to call:

1<#assign updateURL = portletURLFactory.create(request,"169_INSTANCE_X4hfOUKZyDvi", page.getPlid() ,"RENDER_PHASE")>


I get the error:

Expression page is undefined on line 55, column 122 in 10157#10197#11814.
Sandeep Nair
RE: Create-account URL in Velocity template (Liferay 6.1)
15 de agosto de 2014 16:06
Respuesta

Sandeep Nair

Ranking: Liferay Legend

Mensajes: 1721

Fecha de incorporación: 5 de noviembre de 2008

Mensajes recientes

Replace "page" with "layout".

Regards,
Sandeep
Beppo Ivel
RE: Create-account URL in Velocity template (Liferay 6.1)
16 de agosto de 2014 7:32
Respuesta

Beppo Ivel

Ranking: Regular Member

Mensajes: 112

Fecha de incorporación: 9 de abril de 2014

Mensajes recientes

I already used RENDER_PHASE, I was looking for themeDisplay.getPlid(). Do you know how to get the themeDisplay.getPortletDisplay().getId()? This question is related to this thread.