Featured post

Docker setup for Liferay 7 with MySQL

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....:))

1 comment:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or learn thru JavaScript Online Training in India. Nowadays JavaScript has tons of job opportunities on various vertical industry. JavaScript Training in Chennai

    ReplyDelete

Gadget

This content isn't available over encrypted connections yet.