Programmatically Create Menu Item in Joomla
I have created a component in joomla 2.5 that creates a new article and adds that article to a menu item. Creating the article is working fine, but I am having some trouble with creating the menu item. I have the following code: //add the article to a menu item $menuTable = JTable::getInstance('Menu', 'JTable', array()); $menuData = array( 'menutype' => 'client-pages', 'title' => $data[name], 'type' => 'component', 'component_id' => 22, 'link' => 'index.php?option=com_content&view=article&id='.$resultID, 'language' => '*', 'published' => 1, 'parent_id' => '1', 'level' => 1, ); // Bind data if