Search code examples
joomlajoomla-extensionsjoomla1.7

Why does Joomla require a Component to be in the Administration Components Menu?


It seems like this shouldn't be an issue, but I created a generec Ajax component to use for custom Ajax calls. However, I discovered that Joomla requirees a component to be present on the Administrator Components Menu. You even have to specify this in the Component's xml file for this to work properly. Is there anyway to stop this?

thanks!


Solution

  • There is a good explanation in book "Mastering Joomla 1.5 - Extension and Framework Development" by Jams Kennard on how to create XML-RPC extensions like plugins.

    Before you start have a look here:

    Also Joomla sources can give a lot of related information

    EDIT: ok, let say the only way I can imagine doing this is to remove the link directly from the DB just after your component has been installed (or later):

    in your manifest file:

    <administration>
         <menu>Example Menu Item Text</menu>
         <submenu>
             <menu link="anoption=avalue">Example Submenu Item Text</menu>
         </submenu>
    </administration>
    <install>
         <sql>
             <file driver="mysql" charset="utf8">example.install.sql</file>
         </sql>
    </install>
    

    in example.install.sql:

    DELETE FROM jos_menu WHERE (title = "COM_YOUR_COMPONENT" OR title = "com_your_component") AND client_id = 1
    

    but to be onest, I've never used it and I don't known if joomla installer will run it in this order:

    1. create manu item
    2. delete manu item