Programmer's Cookbook

Recipes for the practical programmer

Friday, September 10, 2010

 

Liferay 6: Editing the dockbar

The dockbar is a Struts portlet, so it isn't something that you can control in a theme. Instead, you can modify the JSP that the portlet view uses.

View Files
/webapps/ROOT/html/portlet/dockbar/init.jsp
/webapps/ROOT/html/portlet/dockbar/view.jsp

Whether or not to display the dockbar is controlled in the theme. So in theory you could create your own portlet or vm file to display a completely custom dockbar. The theme file portal_normal.vm, and in the default portal_normal.vm you will see this.


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


The dockbar portlet is referenced in the ROOT application (/webapps/ROOT/WEB-INF/) as portlet name/number 145. Snippets of these references are below.

liberay-portlet.xml

<portlet>
<portlet-name>145</portlet-name>
<icon>/html/icons/default.png</icon>
<struts-path>dockbar</struts-path>
<use-default-template>false</use-default-template>
<show-portlet-access-denied>false</show-portlet-access-denied>
<show-portlet-inactive>false</show-portlet-inactive>
<private-request-attributes>false</private-request-attributes>
<private-session-attributes>false</private-session-attributes>
<render-weight>50</render-weight>
<add-default-resource>true</add-default-resource>
<system>true</system>
</portlet>


portlet-custom.xml

<portlet>
<portlet-name>145</portlet-name>
<display-name>Dockbar</display-name>
<portlet-class>com.liferay.portlet.StrutsPortlet</portlet-class>
<init-param>
<name>view-action</name>
<value>/dockbar/view</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<resource-bundle>com.liferay.portlet.StrutsResourceBundle</resource-bundle>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>

Labels:


Comments:
Orb 25 is a leading provider of Digital Integrated Business Services and Transformation Solutions for clients from around the world, representing all industry types.

Experience
Our company delivers proven solutions for optimizing processes, delivering exceptional customer experiences, and ensuring unmatched business agility.

Quick Support
Our technology solutions have world-class, award-winning security measures
and compliance with all Security Standards and Regulations.

We represent a global Center of Excellence within the Orb25 group for delivering customized and cost-effective Back-Office services, Digital, and web marketing services, Event management, Call center services, Video production services, etc.
orb25
 
I learned some useful things from this article. Thanks for sharing such helpful content.service now training online
 
Thanks for putting this information together. It was a useful and interesting read.boomi courses

 
Develop specialized integration skills with a practical Workday Studio Course covering development concepts, integration workflows, data processing, and connectivity. Learners can gain useful knowledge for handling Workday integration requirements in enterprise environments.
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?