Foren
How to hide the dockbar?
Rupesh Chotai, geändert vor 13 Jahren.
How to hide the dockbar?
Regular Member Beiträge: 163 Beitrittsdatum: 23.03.11 Neueste Beiträge
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.
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, geändert vor 13 Jahren.
RE: How to hide the dockbar?
Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
See this post
You might need to modify portal_normal.vm in theme for
-Ravi -aka- D'Maverick
You might need to modify portal_normal.vm in theme for
#if($is_signed_in)
#dockbar()
#end
-Ravi -aka- D'Maverick
ankit sharma, geändert vor 12 Jahren.
RE: How to hide the dockbar?
New Member Beiträge: 5 Beitrittsdatum: 22.03.12 Neueste Beiträge
hey all !!
How can dockbar be hidden for all users except the administrator?
Thanks
How can dockbar be hidden for all users except the administrator?
Thanks
Ravi Kumar Gupta, geändert vor 11 Jahren.
RE: How to hide the dockbar?
Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
Ankit,
Did you try this
Did you try this
#if ($permissionChecker.isOmniadmin())
#dockbar()
#end
ankit sharma, geändert vor 11 Jahren.
RE: How to hide the dockbar?
New Member Beiträge: 5 Beitrittsdatum: 22.03.12 Neueste Beiträge
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
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, geändert vor 11 Jahren.
RE: How to hide the dockbar?
Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
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
HTH
ankit sharma, geändert vor 11 Jahren.
RE: How to hide the dockbar?
New Member Beiträge: 5 Beitrittsdatum: 22.03.12 Neueste Beiträge
I am using Liferay 6.1
Is it not possible to hide the dockbar without developing Hooks ?
Is it not possible to hide the dockbar without developing Hooks ?
Ravi Kumar Gupta, geändert vor 11 Jahren.
RE: How to hide the dockbar?
Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
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
HTH
ankit sharma, geändert vor 11 Jahren.
RE: How to hide the dockbar?
New Member Beiträge: 5 Beitrittsdatum: 22.03.12 Neueste Beiträge
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?
Is there any alternate way to give user option to go to his private/ public pages?
Ravi Kumar Gupta, geändert vor 11 Jahren.
RE: How to hide the dockbar?
Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
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.
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, geändert vor 8 Jahren.
RE: How to hide the dockbar?
New Member Beiträge: 4 Beitrittsdatum: 27.11.15 Neueste Beiträge
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
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
Dhrutika Parekh, geändert vor 13 Jahren.
RE: How to hide the dockbar?
Expert Beiträge: 435 Beitrittsdatum: 09.02.09 Neueste Beiträge
Hi,
You can add following condition:
#if ($permissionChecker.isOmniadmin())
#dockbar()
#end
You can add following condition:
#if ($permissionChecker.isOmniadmin())
#dockbar()
#end
Rupesh Chotai, geändert vor 13 Jahren.
RE: How to hide the dockbar?
Regular Member Beiträge: 163 Beitrittsdatum: 23.03.11 Neueste Beiträge
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.
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 Parekh, geändert vor 13 Jahren.
RE: How to hide the dockbar?
Expert Beiträge: 435 Beitrittsdatum: 09.02.09 Neueste Beiträge
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
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, geändert vor 13 Jahren.
RE: How to hide the dockbar?
Regular Member Beiträge: 163 Beitrittsdatum: 23.03.11 Neueste Beiträge
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.
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, geändert vor 13 Jahren.
RE: How to hide the dockbar? (Antwort)
Regular Member Beiträge: 163 Beitrittsdatum: 23.03.11 Neueste Beiträge
Hi All,
I find the answer:
Put the below line of code in portal_normal.vm in your theme
Thank you all for the replies.
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, geändert vor 13 Jahren.
RE: How to hide the dockbar?
New Member Beiträge: 9 Beitrittsdatum: 31.03.11 Neueste Beiträge
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
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, geändert vor 13 Jahren.
RE: How to hide the dockbar?
Regular Member Beiträge: 163 Beitrittsdatum: 23.03.11 Neueste Beiträge
Hi Leen,
You can update the user profile and add photo/picture there to appear in the dock bar.
You can update the user profile and add photo/picture there to appear in the dock bar.