• Control Panel Portlet:Move a Portlet to Control Panel

    Posted on February 14, 2016 by Hamidul Islam in Liferay.



    As a Liferay Portal developer we know whats Control Panel. Sometimes we need to develop a portlet which should be only available in the Control Panel but not in other places. In this article we will show how to move a custom built portlet to the control panel.

    We will try to convert or move our portlet to Control Panel which is already developed


    Below are the 2 files we need to modify to make a Control Panel Portlet

    i) liferay-portlet.xml


    ii) liferay-display.xml

    Follow the below steps to make existing portlet to available in Control Panel Portlet

    Step 1:Specify where the portlet will appear in Control Panel

    Open your liferay-portlet.xml. Add the below tags after <icon> tag


    Note 1: In the above code the line <control-panel-entry-category>apps</control-panel-entry-category> says where our portlet will appear in the Contro Panel.

    According to DTD below is the explanation

    Set the control-panel-entry-category value to "my" to make this portlet available within the My Account administration of the user. Set the value to "apps", "configuration", "sites", or "users" to make it available in the Control Panel under that category. Set the value to "site_administration.configuration", "site_administration.content", "site_administration.pages" or "site_administration.users" to make it available in the Site Administration under that category. Legacy values from previous versions of Liferay will be automatically mapped to the new values: "content" to "site_administration.content", "portal" to "users", and "server" to "apps".

    DTD Link: http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd

    Note 2: The Tag <control-panel-entry-weight> represents location vertically in the given category. According to our code Book Portlet will appear at first position in apps category. 


    Step 2:Make the portlet hidden

    In this step we put the portlet in hidden category so that it's not available anywhere other than Control Panel. This is done by modifying liferay-display.xml. For example 

    <category name="category.hidden">
    <portlet id="book-portlet" />

    That's all about making your portlet available in Control Panel.

    Download Above Example:


    Post Tagged with ,

One Response so far.

  1. John says:

    Hello, thanks for the post.

    How can modify the whole product menu? I am using liferay 7, and it says I should first create a GENERIC MODULE but I can't find how to generate a GENERIC MODULE because using blade cli, doesn't give me option of creating a generic module because it comes with templates.
    Please help.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.