open the docbar left side menu in the custom jsp page in liferay -


i have requirement need add 1 link or button in docbar. custom jsp of portlet when click link or button should open docbar left menu.for example in docbar if click on edit page open left menu shown below.how achieve ?

enter image description here

i have tried open left menu link form custom jsp page, not opened have included docabr.js in custom jsp page. can 1 guide me how achieve this? following code have tried:

<script type="text/javascript" src="/html/js/liferay/dockbar.js"></script>  <portlet:renderurl var="editlayouturl" windowstate="<%= liferaywindowstate.exclusive.tostring() %>">                 <portlet:param name="struts_action" value="/dockbar/edit_layout_panel" />                 <portlet:param name="closeredirect" value="<%= portalutil.getlayouturl(layout, themedisplay) %>" />                 <portlet:param name="groupid" value="<%= string.valueof(scopegroupid) %>" />                 <portlet:param name="selplid" value="<%= string.valueof(plid) %>" />             </portlet:renderurl>  <aui:nav-item anchorid="editlayoutpanel" cssclass="page-edit-controls" data-panelurl="<%= editlayouturl %>" href="javascript:;" iconcssclass="icon-edit" label="edit" /> <aui:script position="inline" use="liferay-dockbar">     liferay.dockbar.init('#<portlet:namespace />dockbar');      var customizablecolumns = a.all('.portlet-column-content.customizable');      if (customizablecolumns.size() > 0) {         customizablecolumns.get('parentnode').addclass('customizable');     } </aui:script> 

you need register panel in dockbar this:

<aui:script use="liferay-dockbar">     liferay.dockbar.dockbar_panels.mypanel = {         css: 'lfr-has-mypanel',         id: 'mypanel',         node: null,         showfn: a.bind(liferay.dockbar._showpanel, liferay.dockbar),         tpl: '<div class="lfr-add-panel lfr-admin-panel" id="{0}" />'     }; </aui:script> 

you can check out working implementation of in audience targetting simulator hook


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -