Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Luca kk
How to hide a page after user log in
9 febbraio 2012 1.17
Risposta

Luca kk

Punteggio: Expert

Messaggi: 284

Data di Iscrizione: 7 dicembre 2010

Messaggi recenti

Hi all,
I builded my portal with an initial login form which is a
page called "Login": in this page I have only a "login" portlet.
At beginning, the menu bar has only this page.
After user log in, even the other pages will appear because I set them
with "View" permission for user and not for guest.
The page "Login" has "View" permission for guest
and not for user but automatically it has "View" permission even
for the user (because User is stronger role than Guest).

How can I do to hide "Login" page (for user) after login?

Does it exsist another solution to this?

Thanks in advance.
Jignesh Vachhani
RE: How to hide a page after user log in
9 febbraio 2012 1.45
Risposta

Jignesh Vachhani

Punteggio: Liferay Master

Messaggi: 785

Data di Iscrizione: 10 marzo 2008

Messaggi recenti

you can write your logic in navigation.vm file in theme and check the login condition and render the navigation.vm content accordingly.
Luca kk
RE: How to hide a page after user log in
9 febbraio 2012 2.10
Risposta

Luca kk

Punteggio: Expert

Messaggi: 284

Data di Iscrizione: 7 dicembre 2010

Messaggi recenti

Hi Jiqnesh,
thanks for reply.
How can I check the login condition?

Luca
Mayur Patel
RE: How to hide a page after user log in
9 febbraio 2012 2.58
Risposta

Mayur Patel

Punteggio: Expert

Messaggi: 349

Data di Iscrizione: 17 novembre 2010

Messaggi recenti

Hello Luca,

Your check in navigation.vm could be like this

1#foreach ($nav_item in $nav_items)
2            #if(!$nav_item.getName().equals("PagetoHide") || !$is_signed_in)
3                            // render the navigation
4            #end
5#end


Refer Hide page for authenticated users for more

Thanks
Luca kk
RE: How to hide a page after user log in
9 febbraio 2012 3.34
Risposta

Luca kk

Punteggio: Expert

Messaggi: 284

Data di Iscrizione: 7 dicembre 2010

Messaggi recenti

Hi Mayur,
thanks for reply and tip,
it works!!!!!!!!!!!

Luca
Mayur Patel
RE: How to hide a page after user log in
9 febbraio 2012 4.05
Risposta

Mayur Patel

Punteggio: Expert

Messaggi: 349

Data di Iscrizione: 17 novembre 2010

Messaggi recenti

Good to hear this emoticon , Thanks to jignesh also for pointers !!!!
Jignesh Vachhani
RE: How to hide a page after user log in
9 febbraio 2012 22.21
Risposta

Jignesh Vachhani

Punteggio: Liferay Master

Messaggi: 785

Data di Iscrizione: 10 marzo 2008

Messaggi recenti

Cheers !!!!! emoticon
Shankar Baba
RE: How to hide a page after user log in
22 novembre 2012 1.58
Risposta

Shankar Baba

Punteggio: Regular Member

Messaggi: 144

Data di Iscrizione: 17 ottobre 2012

Messaggi recenti

Jignesh Vachhani:
you can write your logic in navigation.vm file in theme and check the login condition and render the navigation.vm content accordingly.



Dear Jignesh ,can u tell me the logic crispily, what should i write , i have a login page , just after login of a user, i dont want to show that login page for user in dockbar, for this what logic i have to write, please need help, bcz i dont have any previous knowledge,Thanks
Tejas Kanani
RE: How to hide a page after user log in
22 novembre 2012 7.52
Risposta

Tejas Kanani

Punteggio: Liferay Master

Messaggi: 655

Data di Iscrizione: 6 gennaio 2009

Messaggi recenti

Shivaji,

You can make login page hidden so that it wont show in Navigation. And from Control Panel --> Portal Settings you can define the default home page so that every time login page will come up when user opens site.

Thanks,
Tejas
Vikash Pareek
RE: How to hide a page after user log in
3 febbraio 2013 23.20
Risposta

Vikash Pareek

Punteggio: New Member

Messaggi: 15

Data di Iscrizione: 10 dicembre 2012

Messaggi recenti

Hi Tejas Sir,
It is good logic but if i want to improve this by following way then what should i have to do ?

Guest only view login page and after successfully logged in (become user) view all the page of default site.
Above worked with your logic but i want after successfully logged in he redirect to home page of default site not stay on login page by viewing this message "you are logged in with 'XYZ' ".

For above requirement i have done following 2 attempts :

1.) If i use "default.landing.page.path=/web/guest/home" property then it worked fine but when session time out and user logged in again then user do not redirect to last page at which time out done. In this case user redirect to /web/guest/home due to default.landing.page property.
I have already set "auth.forward.by.last.path=true" property.

2.) If i have set "default.landing.page.path=/c/portal/login" property and did not give view permission to guest for all the page in default site then /c/portal/login page also not visible and error founds "you dont have permission to view this page".

So please tell me what i have to do ?
Gurumurthy Godlaveeti
RE: How to hide a page after user log in
4 luglio 2013 22.18
Risposta

Gurumurthy Godlaveeti

Punteggio: Regular Member

Messaggi: 209

Data di Iscrizione: 11 agosto 2011

Messaggi recenti

Mayur Patel:
Hello Luca,

Your check in navigation.vm could be like this

1#foreach ($nav_item in $nav_items)
2            #if(!$nav_item.getName().equals("PagetoHide") || !$is_signed_in)
3                            // render the navigation
4            #end
5#end


Refer Hide page for authenticated users for more

Thanks


Hello Mayur,

I got your point about how to hide a page as per logged in user , but as per my requirement , can u tell me the Liferay solution.

I have one theme & i am going to use it for multiple organizations. I have many number of guest pages & Guest pages vary from one organization to another organization so how to handle in naviagtion.vm .
Mayur Patel
RE: How to hide a page after user log in
5 luglio 2013 0.14
Risposta

Mayur Patel

Punteggio: Expert

Messaggi: 349

Data di Iscrizione: 17 novembre 2010

Messaggi recenti

Hi Gurumurthy,

Please create a new thread for this.

Thanks,
Anuvab Ghosh
RE: How to hide a page after user log in
30 ottobre 2015 1.23
Risposta

Anuvab Ghosh

Punteggio: Regular Member

Messaggi: 112

Data di Iscrizione: 17 aprile 2015

Messaggi recenti

Mayur Patel:
Hello Luca,

Your check in navigation.vm could be like this

1#foreach ($nav_item in $nav_items)
2            #if(!$nav_item.getName().equals("PagetoHide") || !$is_signed_in)
3                            // render the navigation
4            #end
5#end


Refer Hide page for authenticated users for more

Thanks


I have almost the same requirement. I want to hide one navigation menu ("Login") after user logged in.
How to do it?
and please tell me how to render or hide it in vm file?

Thanks in advance.