I am creating a page using Liferay6.2 where i need to have left side menus respective to my page. For that i need something similar to dockbar present in Liferay 6.2. Is it possible to create something like that ? And is it possible to place them so that it is visible irrespective of the page we are in. Please help me with some solution.
Asked
Active
Viewed 4,033 times
2
-
1Do you mean you want to modify the dockbar to have it on left side of page ? for that you can create hook and modify jsp of dockbar portlet (and have your custom code for left area) – Ankit P Feb 20 '14 at 08:50
-
Thanks for the reply. One more question, if i modify then existing dock bar, then it wont be available even when user login as admin right? – user2574980 Feb 20 '14 at 10:32
-
Do you know where is the logic is present which inserts dockbar to left side of the page. Say, is there any VM file for that? – user2574980 Feb 20 '14 at 10:33
-
It depends on what you are looking to modify in existing dockbar, the current dockbar is already handled based on user/admin so your modification will apply for both. by default the dockbar come at top it is included by this line #dockbar() in portal_normal.vm file, #dockbar() internally calls dockbar portlet view.jsp – Ankit P Feb 20 '14 at 11:04
1 Answers
4
The best thing to do is create a hook and modify the portlet this way. In your liferay-hook.xml use the following:
<hook>
<custom-jsp-dir>/WEB-INF/jsp</custom-jsp-dir>
</hook>
Then download the Liferay source code for reference and put the original JSP you want to modify into the /WEB-INF/jsp folder following the same directory structure as the original file. Edit the JSP, and it will override the original ones. The original files will be automatically renamed with a .portal.jsp extension.
For instance, if you want to modify view_user_account.jspf of the dockbar, then use the structure /WEB-INF/jsp/html/portlet/dockbar/view_user_account.jspf. After you deploy the hook, Liferay will rename the original view_user_account.jspf to view_user_account.portal.jspf.

acvcu
- 2,476
- 10
- 40
- 56