Pages

Sunday 14 October 2012

Add a portlet to the Liferay Control Panel

Add a portlet to the Liferay Control Panel
If you want your portlet to be available in the liferay control panel, just add the following line in your liferay-portlet.xml:


<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>15</control-panel-entry-weight>



  • control-panel-entry-category: The category where your plugin portlet will appear.
    • There are total 4 values you can use as per your requirements for category element.
      1. my
      2. content
      3. portal
      4. server
  • control-panel-entry-category: Determine the relative position in your relevant category portlet.The higher the number, the lower in the list your portlet will appear within that category. 
  • control-panel-entry-class: This is optional and is used to define rights (Who can see the portlet in the control panel). 


Make sure your portlet is not instanciable if you want your portlet in control panel.

add below line to your liferay-portlet.xml (for make portlet not instanciable).

<instanciable>false</instanciable>

I hope it helps you guys.... :)


2 comments:

  1. Hi Ketan, do you have any idea how we allow user with power user role to able to see our portlet from custom category in control panel

    ReplyDelete
    Replies
    1. Hi Jerry,

      You can assign your user to Power User Roles category.
      Logged in with power user and go to "control panel". Click on Roles link. You can see there list of roles. Now click on Action button of Power user link and assign members to it.

      Delete