Forum

Accueil » Liferay Portal » English » 3. Development

Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
kumar E
new category in control panel
22 mars 2013 21:55
Réponse

kumar E

Rang: Junior Member

Publications: 57

Date d'inscription: 3 octobre 2012

Publications Récentes

hi all,

I have a Question how to add a new category in control panel

how to do this
plz help me

thank u
vinod
Hitoshi Ozawa
RE: new category in control panel
22 mars 2013 22:14
Réponse

Hitoshi Ozawa

Rang: Liferay Legend

Publications: 7990

Date d'inscription: 23 mars 2010

Publications Récentes

I'm not sure about your question but I think there was a "Category" in the menu or are you asking something entirely different.
kumar E
RE: new category in control panel
22 mars 2013 22:29
Réponse

kumar E

Rang: Junior Member

Publications: 57

Date d'inscription: 3 octobre 2012

Publications Récentes

hi hitoshi

when we open control panel we can find 4 category's named blogs,liferay,portal,server.on your left side.
now i want one more category "education" below the portal category

this is my question.
Hitoshi Ozawa
RE: new category in control panel
22 mars 2013 23:02
Réponse

Hitoshi Ozawa

Rang: Liferay Legend

Publications: 7990

Date d'inscription: 23 mars 2010

Publications Récentes

Did you take a look at <control-panel-entry-category> in the following file
/webapps/ROOT/WEB-INF/liferay-portlet.xml
Vitaliy Koshelenko
RE: new category in control panel
25 mars 2013 07:26
Réponse

Vitaliy Koshelenko

Rang: Regular Member

Publications: 222

Date d'inscription: 25 mars 2011

Publications Récentes

Hi, Vinod.

If you need to add your custom control panel category - you can patch com.liferay.portal.util.PortletCategoryKeys class:

 1public class PortletCategoryKeys {
 2
 3    public static final String CONTENT = "content";
 4
 5    public static final String MARKETPLACE = "marketplace";
 6
 7    public static final String MY = "my";
 8
 9    public static final String PORTAL = "portal";
10
11    public static final String SERVER = "server";
12
13    public static final String[] ALL = {
14            MARKETPLACE, MY, CONTENT, PORTAL, SERVER
15    };
16
17}


Just specify category you need and add it to ALL array. After that set <control-panel-entry-category> to the value you specified.

Vitaliy
Archana S
RE: new category in control panel
25 mars 2013 20:49
Réponse

Archana S

Rang: Junior Member

Publications: 45

Date d'inscription: 30 janvier 2013

Publications Récentes

Have a look
http://www.liferay.com/community/forums/-/message_boards/message/9540478
Parikshit Sharma
RE: new category in control panel
25 mars 2013 23:37
Réponse

Parikshit Sharma

Rang: New Member

Publications: 21

Date d'inscription: 16 janvier 2013

Publications Récentes

Why can't you simply hook the jsp(portlet/control_panel_menu/view.jsp)...
Nono Carballo
RE: new category in control panel
24 avril 2013 14:37
Réponse

Nono Carballo

Rang: New Member

Publications: 16

Date d'inscription: 25 juin 2012

Publications Récentes

Parikshit Sharma:
Why can't you simply hook the jsp(portlet/control_panel_menu/view.jsp)...


I have modified the html/portlet/control_panel_menu/view.jsp in a hook. I have added my category name to the allCategories array, in the place where I want it be visible.
In my portlet I have the modified de control-panel-entry-category in liferay-portlet.xml to point to my new category, I have also added the language propery in the hook.

The ne category appears in control panel and the portlet is listed in, but when I access the portlet I got the error "You do not have the required permissions to access this application.". If I move the portlet to the content category (where it was before) everything works fine. The URL generated is the same in both categories.

I have also created a ControlPanelEntry class and overriden isVisible (both) methods to return true, and the method (the one with the largest signature) is called.

Any help? I don't know where to look for.

Nono