Tribune

Home » Liferay Portal » English » 2. Using Liferay » General

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Rupesh Chotai
How to hide the dockbar?
25 marzo 2011 12.50
Risposta

Rupesh Chotai

Punteggio: Regular Member

Messaggi: 163

Data di Iscrizione: 23 marzo 2011

Messaggi recenti

Hi All,
I have requirement to show dockbar only for the Admin user role and not for the guest.
How can this be configured in liferay?

Thanks in advance for the reply.
Ravi Kumar Gupta
RE: How to hide the dockbar?
26 marzo 2011 0.40
Risposta

Ravi Kumar Gupta

Punteggio: Liferay Legend

Messaggi: 1303

Data di Iscrizione: 23 giugno 2009

Messaggi recenti

See this post

You might need to modify portal_normal.vm in theme for
1#if($is_signed_in)
2    #dockbar()
3#end


-Ravi -aka- D'Maverick
Dhrutika Vyas
RE: How to hide the dockbar?
28 marzo 2011 2.23
Risposta

Dhrutika Vyas

Punteggio: Expert

Messaggi: 438

Data di Iscrizione: 9 febbraio 2009

Messaggi recenti

Hi,

You can add following condition:


#if ($permissionChecker.isOmniadmin())
#dockbar()
#end
Rupesh Chotai
RE: How to hide the dockbar?
28 marzo 2011 6.27
Risposta

Rupesh Chotai

Punteggio: Regular Member

Messaggi: 163

Data di Iscrizione: 23 marzo 2011

Messaggi recenti

Hi Dhrutika,
Thanks for the reply. It works when I updated the portal_normal.vm (html\themes\classic\templates) under ROOT.war

However, it hides the 'Sign-In' link as well from the upper right corner, which is not acceptable. Can you suggest what is required to just hide the Dock bar for all non-admin users and show Sign-in link.

Thanks in advance.
Dhrutika Vyas
RE: How to hide the dockbar?
28 marzo 2011 22.39
Risposta

Dhrutika Vyas

Punteggio: Expert

Messaggi: 438

Data di Iscrizione: 9 febbraio 2009

Messaggi recenti

Hi Rupesh,

If you are using Liferay 6 classic theme,login link should not be hidden.

Then also verify your portal_normal.vm.It should have following line in code.

#if(!$is_signed_in)
<a href="$sign_in_url" id="sign-in" rel="nofollow">$sign_in_text</a>
#end

One point that you should not extend classic theme by changing in ROOT.war.You should create new theme as replication of classic theme and apply your changes.

Regards,
Dhrutika Parekh
Rupesh Chotai
RE: How to hide the dockbar?
29 marzo 2011 12.22
Risposta

Rupesh Chotai

Punteggio: Regular Member

Messaggi: 163

Data di Iscrizione: 23 marzo 2011

Messaggi recenti

Hi Dhrutika,
Thank you for the reply.
I am created new theme which is replica of Classic theme. And the code you have mentioned is also present. May be I have mentioned 'Sign-in' in previous post so it might have create some confusion.
To elaborate more on the issue, please see below scenario:
1. Login as Admin -> Dock bar displayed -> Logout option is available.
2. Login as non-admin -> Dock bar hidden -> Logout option is NOT available.

I am looking for logout option for ALL users.
Can you advise in this regards?

Thanks in advance.
Rupesh Chotai
RE: How to hide the dockbar?
4 aprile 2011 13.13
Risposta

Rupesh Chotai

Punteggio: Regular Member

Messaggi: 163

Data di Iscrizione: 23 marzo 2011

Messaggi recenti

Hi All,
I find the answer:
Put the below line of code in portal_normal.vm in your theme


#if ($show_sign_out && !$permissionChecker.isOmniadmin())
<a title="Sign Out" href="$sign_out_url">CDS $sign_out_text</a>
#end


Thank you all for the replies.
leen salam
RE: How to hide the dockbar?
8 aprile 2011 11.18
Risposta

leen salam

Punteggio: New Member

Messaggi: 9

Data di Iscrizione: 31 marzo 2011

Messaggi recenti

hello,

I was facing the the same problem of you.when I read your post the code you post work successfully with me and solved my problem,
BUT ,if i want the picture of the user and his name to appear beside the "sign out"
can you help me in that please??
sorry ,iam not v.good in english

thanks in advance
Rupesh Chotai
RE: How to hide the dockbar?
11 aprile 2011 6.11
Risposta

Rupesh Chotai

Punteggio: Regular Member

Messaggi: 163

Data di Iscrizione: 23 marzo 2011

Messaggi recenti

Hi Leen,
You can update the user profile and add photo/picture there to appear in the dock bar.
ankit sharma
RE: How to hide the dockbar?
22 marzo 2012 3.10
Risposta

ankit sharma

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 22 marzo 2012

Messaggi recenti

hey all !!

How can dockbar be hidden for all users except the administrator?

Thanks
Ravi Kumar Gupta
RE: How to hide the dockbar?
22 aprile 2012 5.42
Risposta

Ravi Kumar Gupta

Punteggio: Liferay Legend

Messaggi: 1303

Data di Iscrizione: 23 giugno 2009

Messaggi recenti

Ankit,

Did you try this
1#if ($permissionChecker.isOmniadmin())
2#dockbar()
3#end
ankit sharma
RE: How to hide the dockbar?
22 aprile 2012 5.53
Risposta

ankit sharma

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 22 marzo 2012

Messaggi recenti

Ravi,

Ya it works have tried that, i had one more question i.e how can be few option removed from the dockbar of user for eg, removing option of going to control panel, adding pages and portlets etc ?

Thanks,
Ankit
Ravi Kumar Gupta
RE: How to hide the dockbar?
22 aprile 2012 6.40
Risposta

Ravi Kumar Gupta

Punteggio: Liferay Legend

Messaggi: 1303

Data di Iscrizione: 23 giugno 2009

Messaggi recenti

Which version you are using.. ? for 6.0.x versions you should change the jsps in /webapps/ROOT/html/dockbar/. Remember to create a jsp hook instead of directly modifying the jsps.

HTH
ankit sharma
RE: How to hide the dockbar?
22 aprile 2012 7.52
Risposta

ankit sharma

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 22 marzo 2012

Messaggi recenti

I am using Liferay 6.1
Is it not possible to hide the dockbar without developing Hooks ?
Ravi Kumar Gupta
RE: How to hide the dockbar?
22 aprile 2012 8.12
Risposta

Ravi Kumar Gupta

Punteggio: Liferay Legend

Messaggi: 1303

Data di Iscrizione: 23 giugno 2009

Messaggi recenti

Yes, it is possible. But anything you modify in liferay which already exists, the recommended way is to use hooks/ext. If you want to hide some part of dockbar then you need to modify jsps. Otherwise, if you want to hide the dock completely, then you can just create a new theme and apply your logic in portal_normal.vm file of the template in theme.

HTH
ankit sharma
RE: How to hide the dockbar?
22 aprile 2012 8.15
Risposta

ankit sharma

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 22 marzo 2012

Messaggi recenti

k, but if the dockbar is hidden then a particular user wont be able to go to his private and public pages.
Is there any alternate way to give user option to go to his private/ public pages?
Ravi Kumar Gupta
RE: How to hide the dockbar?
22 aprile 2012 10.23
Risposta

Ravi Kumar Gupta

Punteggio: Liferay Legend

Messaggi: 1303

Data di Iscrizione: 23 giugno 2009

Messaggi recenti

You can put the code which generates url for public and private pages; at the place where you need.
Thing is, its not that if dockbar is not there so there won't be any pages. Pages are there and dockbar is just holding the links to those pages.
Chris Moberly
RE: How to hide the dockbar?
10 febbraio 2016 21.27
Risposta

Chris Moberly

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 27 novembre 2015

Messaggi recenti

This thread was extremely helpful!

In case anyone stumbles on this, I put the suggestions above in a combined format. This ensures only admins see the dockbar, and non-admins will see a log out option but only when they are logged in.

I placed this in the 'portal_normal.vm' file in my these, making sure to write it around the existing code for #dockbar:

#if($is_signed_in)
#if ($permissionChecker.isOmniadmin())
#dockbar()
#else
<div align="right"><a title="Sign Out" href="$sign_out_url"><b>Sign Out...</b></a></div>
#end
#end