Ok, so I have created two components that work independently but also have the ability to reference each other and use data from one another. I would like to set up a link between each of the components control panel and currently I am checking the database to see if a certain table is present if it is add another link.
I can get an extra link to display but i don't know how to make it link to another component, here is my code so far.
File:
administrator/components/com_mycomponent/helpers/helper.php
switch($alias)
{
case 'cpanel':
case 'menu':
default:
$links = array(
'admin.customers.default',
'admin.venues.default',
'admin.riskassesment.default',
'admin.events.default',
'admin.floorplans.default',
'admin.eventmenus.default'
);
$tables = JFactory::getDbo()->getTableList();
$mainframe = JFactory::getApplication();
$prefix = $mainframe->getCfg('dbprefix');
if(in_array($prefix.'serveit_mealcategories', $tables)) {
array_push($links, 'com_serveit.default');
}
if ($alias != 'cpanel')
array_unshift($links, 'admin.cpanel');
break;
}
so I just need to know how to create a link to the control panel of my other component,
Thanks in advance.