How to add custom portlet in Control Panel section

后端 未结 2 1664
情歌与酒
情歌与酒 2021-01-02 18:29

How can I add a custom portlet to the Portal section of the Control Panel, as shown in the following figure:

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-02 19:11

    Here is how to do it:

    1. In your portlet's liferay-portlet.xml (you can check the DTD of this xml for more information on other tags) include two tags in your tag as shown:

      
          MyCustomPortlet
          /mycustom.png
          
          
          portal
      
          
          100
      
          false
          /css/main.css
          /js/main.js
          mycustomportlet-portlet
      
      
    2. Also, if you don't want your portlet to appear in the Add Menu so that it is not put on other pages, then in your liferay-display.xml you can include:

      
          
              
              
          
      
      
    3. Build and deploy your portlet and you are good to go.

提交回复
热议问题