Simply we can add joomla component sub menu using component installation xml file. For that you need to include fallowing xml elements in your xml file inside com installation zip file.
if some one need to add additional sub menus when already installed component you can add those using simple direct DB insert operation.
Steps:
1. Go to the joomla database.
2. Select "DBfrefix_components" table.
3. Get component id by doing some search for "name" column and select its "id".
4. Now add your desired sub menu as fallow.
INSERT INTO `jos_components` (`id`, `name`, `link`, `menuid`, `parent`,
`admin_menu_link`, `admin_menu_alt`, `option`, `ordering`, `admin_menu_img`,
`iscore`, `params`, `enabled`) VALUES
(1, 'Main Menu Name/Component Name', 'option=com_componentname'
, 0, 0,'option= com_componentname', 'Main Menu Name/Component Name',
'com_componentname', 0, 'path to icon file', 0, '', 1 )
id: Auto increment field.
parent: Represent the searched result id as component id (step 03).
name: Name for menu.
admin_menu_link: Link of menu (Eg : option=com_clienti&task=categoryselect).
option : Parent component (Eg : com_clienti)
admin_menu_alt : Menu alt
ordering : Order for display menu.
admin_menu_img : Menu icon image source.
enabled : Enable menu.
nao percebi nada
ReplyDelete