Featured post

Docker setup for Liferay 7 with MySQL

Showing posts with label add application menu. Show all posts
Showing posts with label add application menu. Show all posts

Tuesday, 14 February 2012

Add Hidden/Admin portlets in Add more Applications Menu (Liferay)

Most of the requirement from the client comes by saying that they want the same user portlet as available in Control Panel. This can be achieved by below details.

1) Create a hook name addUserToAddApplication.
2) Create structure WEB-INF/jsp/html/portlet/layout_configuration.
3) copy view_category.jsp from source html/portlet/layout_configuration.
4) Add below lines in your jsp on line no 53 just above the while loop -

//   Use your own Category.

if(Validator.equals(portletCategory.getName(),"CATEGORY.NAME"))
{
     // 125 is portlet id of ENTERPRISE_ADMIN_USER PORTLET.

Portlet userportlet = PortletLocalServiceUtil.getPortletById(user.getCompanyId(), "125");
portlets.add(userportlet);
}

5) Deploy your hook.
6) Check your Add Application menu, you are free to add user portlet to your page.

Try & Enjoy the function....:))