开发者

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 g开发者_StackOverflow社区enerec 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!


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:

  • http://docs.joomla.org/Generating_JSON_output
  • http://groups.google.com/group/joomla-dev-cms/msg/c513fe8ef8039083
  • and http://docs.joomla.org/Xml-rpc_changes_in_Joomla!_1.6

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


There is a good way to manage the administration menu through advanced admin menu

http://www.theartofjoomla.com/extensions/advanced-administrator-menu.html

You can group your component in a special or existing tab to bring it out of attention


I know in Joomla 1.5 it does'nt require a component to be in that menu? Just don't tell it to put it in the menu! In your component's XML, just make sure the 'administration' block doesn't have a 'menu' entry, like so:

<administration>
    <files>
        <filename>blah... </filename>
    </files>
</administration>

Adding the '<menu>' element to the XML is what adds it to the admin components menu. Creating a post-install SQL file to go back and remove the menu item you've explicitly added seems a bit crazy to me?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜