3

When I create custom components and I need to add a menu type to the site part I've always followed the tutorial on how to do this. In other words I create the default.xml in the view and I now can assign my component to a menu. i.e.

<?xml version="1.0" encoding="utf-8"?>
<metadata>
    <layout title="COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE">
        <message>
            <![CDATA[COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC]]>
        </message>
    </layout>
</metadata>

The problem I have is that this also creates a label under Components in the Administrator interface. Because I have so many custom components my Components menu in the Administrator is getting quite long. It is useless for me to have these components listed in the Administrator interface as I have no extra configuration for these components.

Can I still have my components show up as a menu type but NOT have it show up in the Components menu of the Administrator panel?

2

No, it's not possible by using the API. But you can always disable menu items manually after installation. The administration panel is in fact just a mod_menu module which shows the administration menu, which is hidden in your menu management.

Another way would be to use a different module or alternative layout for mod_menu to exclude specific items.

Hint: If you want to know what happens during installation, look into

libraries/cms/installer/adapter/component.php - line 1209 and following

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.