Fórum

"Sign In" portlet

thumbnail
Eric COQUELIN, modificado 9 Anos atrás.

"Sign In" portlet

Expert Postagens: 254 Data de Entrada: 03/11/13 Postagens Recentes
Hi to everyone,

"Sign in" portlet is included into the default them. By consequence, when you start Liferay, you land onto a page which includes the nice "sign in" button at the top right. When you click that button, it opens a modal so that you can whether sign in or create a new account (if you kept the configuration and allowed strangers to register).

But as "sign in" portlet can be unique on the page, how can we have on the same page the "sign in" button on the top right AND a nice portlet which would include the "create account" part of the "sign in" portlet. Liferay doesn't allow addition of a second instance of "sign in" on the same page...

I know that I could develop a new portlet but as the default features coming with Liferay are fine, I have no reason to add myself some work.

So far, I have not found any solution and have no other alternative than showing a button "register" which redirects to http://<host>/web/<site name>/any-page-which-exists?p_p_id=58&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_58_struts_action=%2Flogin%2Fcreate_account

But that's a separate page and it takes the full page size... emoticon

Any ideas ?

Tx
thumbnail
Eric COQUELIN, modificado 9 Anos atrás.

RE: "Sign In" portlet

Expert Postagens: 254 Data de Entrada: 03/11/13 Postagens Recentes
I found a solution which is as follow

Insert a web content and in the source, add the following

<div id="my-embedded-portlet"><runtime-portlet instance="av3354sdf" name="58" querystring=""> </runtime-portlet></div>

See reference on http://www.liferaysavvy.com/2014/03/embedding-portlet-in-web-contentliferay_26.html

But it doesn't say how to redirect to the "create account" page of that portlet. Maybe using the querystring
thumbnail
Eric COQUELIN, modificado 9 Anos atrás.

RE: "Sign In" portlet

Expert Postagens: 254 Data de Entrada: 03/11/13 Postagens Recentes
Hi,

I'm just raising again this issue as the runtime tag generates errors later. Indeed, when used and when errors occur during the fields validation, error messages are not correctly displayed.

So once again, how is it possible to use the "sign in" portlet like any others available with Liferay? I'd like to drag and drop the portlet on my page as part of the other portlets and being able to configure it to display the login page or the create account page.

Any ideas?

Thanks in advance
thumbnail
Andew Jardine, modificado 9 Anos atrás.

RE: "Sign In" portlet

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Hi Eric,

For the button in the top right, why not just add the button to your them with a <a hred="/c/portal/login"></a> around it -- rather than embedding the portlet? Same thing for the registration page -- there is a struts action that will take you to the registration page directly -- /login/create_account
thumbnail
Eric COQUELIN, modificado 9 Anos atrás.

RE: "Sign In" portlet

Expert Postagens: 254 Data de Entrada: 03/11/13 Postagens Recentes
In both cases, it will bring you to a complete page having only the portlet itself (in maximized view).

What if I want to have a page where there are 4 portlets and one of them is the create account portlet? I'm still looking for the response.

Some will say that I could create my own portlet to register user but the way the native one is done matches perfectly what I need so far. So why duplicating codes?

Tx for any help