Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customizing Liferay 6 Dockbar in Velocity / JS / CSS

I'm not a fan of the whole 'portal dockbar' for normal users (we use Liferay for external facing hosting). And I don't want to show people things like 'Go To' etc (I've hidden the private / public pages using things like must be power user to show, etc).

But I want to eliminate things like un-needed icons on the Dockbar for non admin users (see image) - remove 'Manage' section - remove toggle edit controls (shouldn't even be shown to non admin!?)

I think these things cause confusion for logged in 'basic' users. Liferay Dockbar example

like image 267
Jakub Avatar asked Nov 01 '11 20:11

Jakub


2 Answers

dockbar is a regular portlet, you can modify it as such. It just differs in display because there's some fancy css included in the standard theme, but otherwise there's nothing different customizing the dockbar portlet than for any other portlet.

So you just need to create a hook and override the JSP(s) you'd like -> done.

like image 64
Olaf Kock Avatar answered Nov 02 '22 00:11

Olaf Kock


Keep the following entry in portal_normal.vm file of your theme

#if($is_signed_in)
#if($permissionChecker.isCompanyAdmin($company_id))
#dockbar()
#end

With this code Dockbar will be visible to only Admin.

like image 36
Prasad Avatar answered Nov 02 '22 00:11

Prasad