How to remove component from the admin Components menu?

1,219 views
Skip to first unread message

rgjoyce

unread,
Jan 21, 2013, 10:58:32 AM1/21/13
to joomla-de...@googlegroups.com
I have a set of 7 components.
6 of them are managed and accessed from within the 7th.
How can I remove the first 6 from the components menu without un-publishing them?

sovainfo

unread,
Jan 21, 2013, 12:36:28 PM1/21/13
to joomla-de...@googlegroups.com
Just change the component_id in #__menus to a number that doesn't exist.

Lemings

unread,
Jan 21, 2013, 3:56:06 PM1/21/13
to joomla-de...@googlegroups.com
Another option would bet to create Your own template override for mod_menu in administrator.  You can remove components You do not need and even add new items.

Just copy /administrator/modules/mod_menu/tmpl/default_enabled.php to /administrator/templates/isis/html/mod_menu/ and modify.

Glenn Arkell

unread,
Jan 21, 2013, 4:01:53 PM1/21/13
to joomla-de...@googlegroups.com
I may be way off base or in fact completely wrong, but here goes and if any can comment on this suggestion I would appreciate it....

If the 7th component is like a Control Panel, then would it be possible (or wise) to remove the menu option from each of the other 6 manifests?

Matt Thomas

unread,
Jan 21, 2013, 6:28:18 PM1/21/13
to joomla-de...@googlegroups.com
Yes, unless something has changed since 1.5, omitting the menu entry in the extension's manifest results in not creating the menu entry for that component in the back-end.

Best,

Matt Thomas
Founder betweenbrain
Phone: 203.632.9322
Twitter: @betweenbrain



--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/TONM8wsyLRsJ.

To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

r...@osdcs.com

unread,
Jan 21, 2013, 8:17:57 PM1/21/13
to joomla-de...@googlegroups.com
The task is to remove them from the components menu to force the user to manage them via the 7th extension.


From: joomla-de...@googlegroups.com [mailto:joomla-de...@googlegroups.com] On Behalf Of Glenn Arkell
Sent: Tuesday, January 22, 2013 4:02 AM
To: joomla-de...@googlegroups.com
Subject: [jgen] Re: How to remove component from the admin Components menu?

Matt Thomas

unread,
Jan 21, 2013, 8:19:55 PM1/21/13
to joomla-de...@googlegroups.com
If using method="upgrade" in the manifest, omitting <menu> will do that. At least, in 1.5 it will.

Best,

Matt Thomas
Founder betweenbrain
Phone: 203.632.9322
Twitter: @betweenbrain



Rob Joyce

unread,
Jan 22, 2013, 5:56:44 AM1/22/13
to joomla-de...@googlegroups.com
Template overrides isn't an option as you can't override the code mod_menu template. you would kill all the other stuff that is installed.
-----Original Message-----
From: joomla-de...@googlegroups.com [mailto:joomla-de...@googlegroups.com] On Behalf Of Lemings
Sent: Tuesday, January 22, 2013 3:56 AM
To: joomla-de...@googlegroups.com
Subject: [jgen] Re: How to remove component from the admin Components menu?

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.

Rob Joyce

unread,
Jan 22, 2013, 5:58:23 AM1/22/13
to joomla-de...@googlegroups.com
There is NO menu option in the manifests. but they still show up.
-----Original Message-----
From: joomla-de...@googlegroups.com [mailto:joomla-de...@googlegroups.com] On Behalf Of Glenn Arkell
Sent: Tuesday, January 22, 2013 4:02 AM
To: joomla-de...@googlegroups.com
Subject: [jgen] Re: How to remove component from the admin Components menu?

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.

Rob Joyce

unread,
Jan 22, 2013, 6:01:28 AM1/22/13
to joomla-de...@googlegroups.com
nope. then something has changed.
even without the menu item in the manifest, they still show up.
they take the name of the menu from the comname.sys.ini language file
Tried replacing the valued for the constant there to "" but it puts an empty line at the top of the components menu.
 
Any other ideas?

Bakual

unread,
Jan 22, 2013, 3:39:14 PM1/22/13
to joomla-de...@googlegroups.com
Joomla 3.0 does indeed always create a menu item for an extension. You could probably delete the entry after the installation in the script, or you cold create a button in your control  panel component which will remove the database entries for the other extensions menu items. Other than that you probably don't have many options.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.

r...@osdcs.com

unread,
Jan 22, 2013, 6:31:38 PM1/22/13
to joomla-de...@googlegroups.com
yeah, but what entries to delete is the question.


From: joomla-de...@googlegroups.com [mailto:joomla-de...@googlegroups.com] On Behalf Of Bakual
Sent: Wednesday, January 23, 2013 3:39 AM
To: joomla-de...@googlegroups.com
Subject: Re: [jgen] Re: How to remove component from the admin Components menu?


To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.

Sergey Romanov

unread,
Jan 23, 2013, 1:06:31 AM1/23/13
to joomla-de...@googlegroups.com
Why not to use install script and on postinstall go to menu and delete whatever you want to be deleted?

Bakual

unread,
Jan 23, 2013, 2:39:13 AM1/23/13
to joomla-de...@googlegroups.com
I'd say you look at the  #__menu table and filter for client_id = 1 and search for link, title or whatever.

piotr_cz

unread,
Jan 23, 2013, 3:42:13 AM1/23/13
to Joomla! General Development
This seems as best solution at the moment.
This is a method I use in postflight method of installation script:
https://gist.github.com/4603186
based on http://stackoverflow.com/questions/10642936/component-without-admin-menu.

Probably can be further optimized (maybe extension id is hold in the
$parent object). One problem I noticed is that in Joomla 2.5 during
uninstallation notice appears that installator is unable to remove
menu, so I'd change $table->delete to $table->publish($ids, 0).

piotr_cz

unread,
Jan 23, 2013, 6:08:02 AM1/23/13
to Joomla! General Development
Update:
omitting <menu /> in component manifest doesn't solve anything; menu
is created with alias and name of current timestamp.

There's no way to unpublish/trash admin menuitem. Only thing that
makes menuitem to not appear is setting menuitem clientid to
something like -1, but then it's not removed on extension uninstall.

I didn't notice a message that menu cannot be removed on uninstall
when there is no component menu.

There was a thread on one of the Joomla lists about adding
functionality to not create menu items on install, but I'm not sure
about current status.

So, given these circumstances IMO best option ATM is to remove new
menuitem on installation postflight.


On Jan 23, 9:42 am, piotr_cz <pkoniec...@hotmail.com> wrote:
> This seems as best solution at the moment.
> This is a method I use in postflight method of installation script:https://gist.github.com/4603186
> based onhttp://stackoverflow.com/questions/10642936/component-without-admin-menu.
Reply all
Reply to author
Forward
0 new messages