Forums

Home » Liferay Social Office

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Gabriel Leon Leyva
top menu
November 12, 2011 12:58 PM
Answer

Gabriel Leon Leyva

Rank: Regular Member

Posts: 241

Join Date: June 20, 2009

Recent Posts

is there a way to hide top menu from logged users? thanks
Attachment

Attachments: top.png (23.2k)
Jignesh Vachhani
RE: top menu
November 15, 2011 2:18 AM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

you can do this with theme code chnages :

you need to update below code in portal-normal.vml file of theme

#if ($is_signed_in)
#dockbar()
#end

Here this code shows that docbar will be visible once user is logged in if you want to hide after login then you can reverse the if condition.


Regards,
Jignesh
liferaycms blog
Gabriel Leon Leyva
RE: top menu
November 14, 2011 7:55 AM
Answer

Gabriel Leon Leyva

Rank: Regular Member

Posts: 241

Join Date: June 20, 2009

Recent Posts

thanks, I added #if ($permissionChecker.isOmniadmin()) to portal_normal.vm so only admin users can see top menu.
Gabriel Leon Leyva
RE: top menu
November 23, 2011 9:23 AM
Answer

Gabriel Leon Leyva

Rank: Regular Member

Posts: 241

Join Date: June 20, 2009

Recent Posts

I added
#if ($permissionChecker.isOmniadmin())
#dockbar()
#end

to portal_normal.vm on the theme templates so only admins could see dockbar, but how do I make that also organization users or community users could see also de dockbar??


Thanks in advance
Jignesh Vachhani
RE: top menu
December 15, 2011 11:24 PM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

you may have to check the roles for logged-in user and need to compare with specific org or community member or admin role in the condition.
Attachments: shared.vm (2.6k)
Sagar A Vyas
RE: top menu
November 24, 2011 12:30 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 655

Join Date: April 17, 2009

Recent Posts

Gabriel Leon Leyva:
I added
#if ($permissionChecker.isOmniadmin())
#dockbar()
#end

to portal_normal.vm on the theme templates so only admins could see dockbar, but how do I make that also organization users or community users could see also de dockbar??


Thanks in advance


Hi Gabriel ,

In your case i guess instead of checking who can see the doc bar , check for reverse condition who can not see docbar.

Like if Particular role can not see it then put condition accordingly emoticon

Thanks,
Sagar Vyas
Gabriel Leon Leyva
RE: top menu
November 25, 2011 8:12 AM
Answer

Gabriel Leon Leyva

Rank: Regular Member

Posts: 241

Join Date: June 20, 2009

Recent Posts

I've done this by the user role, only employees can see dockbar. Thanks.

#foreach ($role in $roles)
#if($role.getName()=="Employee")
#dockbar()
#end