How to add new submenu to my already built component?

398 views
Skip to first unread message

pjdev

unread,
Jan 24, 2014, 2:03:25 AM1/24/14
to joomla-...@googlegroups.com
Hello,
I'm using Joomla 2.5.16
How to add a new submenu to my already built component?
I've tried to add new submenu entry to the main component XML file at the administrator area, but this is not appearing at the dropdown menu of the component..
This is the xml entry I've tried..
<administration>
<menu img="components/com_ocuser/assets/images/s_com_ocuser.png" >COM_OCUSER</menu>
<submenu>

<menu link="option=com_ocuser&amp;view=profiles" view="profiles" img="components/com_ocuser/assets/images/s_profiles.png" alt="Ocuser/Profiles">COM_OCUSER_TITLE_PROFILES</menu>
<menu link="option=com_ocuser&amp;view=courses" view="courses" img="components/com_ocuser/assets/images/s_profiles.png">Courses</menu>

</submenu>
.
.
</administration>

Mark Dexter

unread,
Jan 24, 2014, 12:06:00 PM1/24/14
to Joomla! CMS Development
One way would be to create a new version of the component and upgrade to the new version. I believe the database gets changed during installation to add the menu items in the admin menu. So just up the version number in your XML file and install the newer version. Make sure you have method="upgrade" in your XML file. Good luck. Mark





--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send an email to joomla-...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-cms.
For more options, visit https://groups.google.com/groups/opt_out.

pjdev

unread,
Jan 27, 2014, 7:29:10 AM1/27/14
to joomla-...@googlegroups.com
Thankyou.  Its a nice solution.
If I try to edit database, does it work?
can you tell me which are the tables that affect?

Bakual

unread,
Jan 27, 2014, 10:23:23 AM1/27/14
to joomla-...@googlegroups.com
can you tell me which are the tables that affect?

The menu table and maybe also the assets one. But don't touch it if you don't know what you do.

Use the API provided by Joomla and explained by Mark.
Reply all
Reply to author
Forward
0 new messages