Asked 7 years ago
7 Mar 2017
Views 1628
sandip

sandip posted

Building new Joomla component , menu missing

Trying to create new Joomla component , i did all right but menu is not showing at admin side for Admin .

Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

component should have one xml which should be same name as component name which contain all configuration file.
suppose your component name is jTest than jText.xml is the file which should component have , contain all configuration .


<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="1.5.0">
...
...

<administration>
  <!-- Administration Menu Section -->
 <menu>jTest!</menu>
 
</administration>

...
...
</install>


where there is <administration> tag have <menu> which create admin menu by default and attach to main page of component automatically when you install . so you should be forget to attach this configuration
Rasi

Rasi
answered Nov 30 '-1 00:00

you can do go to database and run manually bellowed query ::


INSERT INTO jos_components (`name`, `link`, `menuid`, `parent`, `admin_menu_link`, `admin_menu_alt`, `option`, `ordering`, `admin_menu_img`, `iscore`, `params`, `enabled`)
VALUES ('component_name', 'option=com_test', '0', '0', 'option=com_test', 'Menu Text', 'com_test', '0', 'js/ThemeOffice/component.png', '0', '', '1');



or if you want to do it auto at installation time than
component_name.xml file should have


INSERT INTO jos_components (`name`, `link`, `menuid`, `parent`, `admin_menu_link`, `admin_menu_alt`, `option`, `ordering`, `admin_menu_img`, `iscore`, `params`, `enabled`)
VALUES ('component_name', 'option=com_test', '0', '0', 'option=com_test', 'Menu Text', 'com_test', '0', 'js/ThemeOffice/component.png', '0', '', '1');


you can add as many submenu and attach with view as per above



Post Answer