フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Luca kk
How to hide a page after user log in
2012/02/09 1:17
答え

Luca kk

ランク: Regular Member

投稿: 242

参加年月日: 2010/12/07

最近の投稿

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
2012/02/09 1:45
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 780

参加年月日: 2008/03/10

最近の投稿

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
2012/02/09 2:10
答え

Luca kk

ランク: Regular Member

投稿: 242

参加年月日: 2010/12/07

最近の投稿

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
2012/02/09 2:58
答え

Mayur Patel

ランク: Expert

投稿: 341

参加年月日: 2010/11/17

最近の投稿

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
2012/02/09 3:34
答え

Luca kk

ランク: Regular Member

投稿: 242

参加年月日: 2010/12/07

最近の投稿

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

Luca
Mayur Patel
RE: How to hide a page after user log in
2012/02/09 4:05
答え

Mayur Patel

ランク: Expert

投稿: 341

参加年月日: 2010/11/17

最近の投稿

Good to hear this emoticon , Thanks to jignesh also for pointers !!!!
Jignesh Vachhani
RE: How to hide a page after user log in
2012/02/09 22:21
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 780

参加年月日: 2008/03/10

最近の投稿

Cheers !!!!! emoticon
Shankar Baba
RE: How to hide a page after user log in
2012/11/22 1:58
答え

Shankar Baba

ランク: Regular Member

投稿: 144

参加年月日: 2012/10/17

最近の投稿

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
2012/11/22 7:52
答え

Tejas Kanani

ランク: Liferay Master

投稿: 653

参加年月日: 2009/01/06

最近の投稿

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
2013/02/03 23:20
答え

Vikash Pareek

ランク: New Member

投稿: 15

参加年月日: 2012/12/10

最近の投稿

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
2013/07/04 22:18
答え

Gurumurthy Godlaveeti

ランク: Regular Member

投稿: 143

参加年月日: 2011/08/11

最近の投稿

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
2013/07/05 0:14
答え

Mayur Patel

ランク: Expert

投稿: 341

参加年月日: 2010/11/17

最近の投稿

Hi Gurumurthy,

Please create a new thread for this.

Thanks,