Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dinesh Balaji
Different Dockbar for Organisation and Community
September 21, 2011 11:56 PM
Answer

Dinesh Balaji

Rank: Junior Member

Posts: 52

Join Date: October 6, 2010

Recent Posts

Dear All,

Is it possible to have two different dockbar.

I have created an Orgabisation, where I have customized the positions of the contents in the dockbar. Now I have created a community in which I want to Use an entirely different dockbar with some other Look and feel. At present scenario, I see the dockbar I have customized for the Organisation in the Community Pages of the End User.

Is this possible ?

Waiting for your reply.

Warm Regards,
Dinesh V
Pranay R Patadiya
RE: Different Dockbar for Organisation and Community
September 22, 2011 12:24 AM
Answer

Pranay R Patadiya

Rank: Regular Member

Posts: 181

Join Date: February 22, 2010

Recent Posts

Hi Dinesh,

Yes you can create your own dockbar and also you can change existing dockbar.

- To create new dockbar you have to modify theme and portal_normal.vm and you show that conditionally.
- To extend existing dockbar you need to write hook to override the existing dockbar jsp. You know that the dockbar is defferent for defferent users these all thing written in /root/html/portle/dockbar/view.jsp

In LR 6 dockbar is introduced as portlet while in older version there is dockbar.js.

Let me know if you want anything else.

Thanks,
Pranay
Dinesh Balaji
RE: Different Dockbar for Organisation and Community
September 22, 2011 11:39 PM
Answer

Dinesh Balaji

Rank: Junior Member

Posts: 52

Join Date: October 6, 2010

Recent Posts

Hi Pranay,

Thanks very much for your reply.

I want to know one thing. If Liferay theme is applied for the page then it shows the default dockbar.

And the dockbar changes if you apply your theme ( because of the dockbar.css in your theme). This holds good for the color and alignment and fonts on the dock bar.

But If I want to hide some contents in the dockbar according to the theme ( which as you said, is done as hooks and I did too ) - how can I control the view.jsp in the dockbar according to the theme selected.

For Eg: If I apply x theme for an User he should able to see Add and Manage in Dockbar and If I apply Y theme for another USer in the same community or Organisation he should not able to see the same.

How to achieve this?
Kindly help.

Warm Regards,
Dinesh V
Pranay R Patadiya
RE: Different Dockbar for Organisation and Community
September 22, 2011 11:54 PM
Answer

Pranay R Patadiya

Rank: Regular Member

Posts: 181

Join Date: February 22, 2010

Recent Posts

Hi,
I think you have already checked the /dockbar/view.jsp in root.
There is code for the same, like we know for control panel and normal logged in user have different dockbar view.That written in this jsp.
In that you can put a condition to show your content conditionally.
You can use themeDisplay.getTheme() to get the current theme and do what you want.

Let me know if you want anything else.

Thanks,
Pranay