<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Viztech IT Solutions Limited &#187; joomla component development</title>
	<atom:link href="http://www.viztech.co.in/tag/joomla-component-development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.viztech.co.in</link>
	<description>Think different...do different</description>
	<lastBuildDate>Sun, 05 Feb 2012 06:01:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How to add menu and sub menu in the Joomla! administration menu for a Component</title>
		<link>http://www.viztech.co.in/blog/how-to-add-menu-and-sub-menu-in-the-joomla-administration-menu-for-a-component</link>
		<comments>http://www.viztech.co.in/blog/how-to-add-menu-and-sub-menu-in-the-joomla-administration-menu-for-a-component#comments</comments>
		<pubDate>Fri, 04 Jun 2010 09:17:56 +0000</pubDate>
		<dc:creator>Viztech</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[joomla component]]></category>
		<category><![CDATA[joomla component development]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.viztech.co.in/?p=124</guid>
		<description><![CDATA[Yesterday, I was talking to one of my friend and then during the discussion, we realized that there is no easily available document which can provide quick information how to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vishwashgaur.com/wp-content/uploads/2010/05/component_menu.jpg"><img class="alignleft size-medium wp-image-99" title="Joomla! Component Menu" src="http://www.vishwashgaur.com/wp-content/uploads/2010/05/component_menu-300x252.jpg" alt="" width="300" height="252" /></a>Yesterday, I was talking to one of my friend and then during the discussion, we realized that there is no easily available document which can provide quick information how to add menus with their sub menus in the back end of Joomla! for a component at the moment of developing the component and/or afterwards so here is a quick tutorial about this:</p>
<p><strong>A) If you are developing a Joomla! component and wants to have menu &amp; sub menu automatically created with the installation of component then follow below:</strong></p>
<p>1. Please add menu and sub menu details in the back end top bar using below code in the componentname.xml file (Please add similar code with your own details in the administration block of the xml file):</p>
<p><span style="font-family: monospace;"> </span></p>
<div id="_mcePaste">
<div id="_mcePaste">
<pre><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">&lt;</span>!--administration files are included here--&gt;</pre>
<pre>&lt;administration&gt;</pre>
<pre>&lt;menu link="option=com_componentname" img="path to icon file"&gt;Main Menu Name/Component Name&lt;/menu&gt;</pre>
<pre>&lt;submenu&gt;</pre>
<pre>&lt;menu view="menuitem1" img="path to icon file"&gt;Menu Item 1&lt;/menu&gt;</pre>
<pre>&lt;menu view="menuitem2" img="path to icon file"&gt;Menu Item 2&lt;/menu&gt;</pre>
<pre>&lt;menu view="menuitem3" img="path to icon file"&gt;Menu Item 3&lt;/menu&gt;</pre>
<pre>&lt;menu view="menuitem4" img="path to icon file"&gt;Menu Item 4&lt;/menu&gt;</pre>
<pre>&lt;menu view="menuitem5" img="path to icon file"&gt;Menu Item 5&lt;/menu&gt;</pre>
<pre>&lt;/submenu&gt;</pre>
<pre>&lt;/administration&gt;</pre>
</div>
</div>
<p><strong>B) If you are developing a Joomla! component and have not completed the development yet then create menu &amp; sub menus manually using below method &#8211; this method is also useful if your component does not have quick links and you want to add them:</strong></p>
<p>Please open your database using phpMyAdmin or any other easy database management tool and then open jos_components table. Please copy the below sql query and change it to meet with your details and run it, it will add menu &amp; sub menus for your component:</p>
<pre>INSERT INTO `jos_components` (`id`, `name`, `link`, `menuid`, `parent`,</pre>
<pre>`admin_menu_link`, `admin_menu_alt`, `option`, `ordering`, `admin_menu_img`,</pre>
<pre>`iscore`, `params`, `enabled`) VALUES

(1, 'Main Menu Name/Component Name', 'option=com_componentname', 0, 0,</pre>
<pre>'option= com_componentname', 'Main Menu Name/Component Name',</pre>
<pre>'com_componentname', 0, 'path to icon file', 0, '', 1),</pre>
<pre>(2, 'Menu Item 1', '', 0, 1, 'option= com_componentname&amp;view=menuitem1',</pre>
<pre>'Menu Item 1', 'com_componentname', 2, 'path to icon file', 0, '', 1),</pre>
<pre>(3, 'Menu Item 2', '', 0, 1, 'option= com_componentname&amp;view=menuitem2',</pre>
<pre>'Menu Item 2', 'com_componentname', 1, 'path to icon file', 0, '', 1),</pre>
<pre>(4, 'Menu Item 3', '', 0, 1, 'option= com_componentname&amp;view=menuitem3',</pre>
<pre>'Menu Item 3', 'com_componentname', 3, 'path to icon file', 0, '', 1),</pre>
<pre>(5, 'Menu Item 4', '', 0, 1, 'option= com_componentname&amp;view=menuitem4',</pre>
<pre>'Menu Item 4', 'com_componentname', 4, 'path to icon file', 0, '', 1),</pre>
<pre>(6, 'Menu Item 5', '', 0, 1, 'option= com_componentname&amp;view=menuitem5',</pre>
<pre>'Menu Item 5', 'com_componentname', 5, 'path to icon file', 0, '', 1);</pre>
<p><strong>NOTE:</strong></p>
<p>1) Entry in the XML file ensures this to be taken care while installing the Joomla Component and then it adds the menu and sub menu at the same time automatically to Joomla! administration menu by making entry into __components DB table<br />
2) Manual entry in the db is required to make it possible as if installation was not done using XML file or you are developing a component but after completion of such component, please make sure to include this in the XML file so that user can do the complete automated installation easily</p>
<p>3) Please note, here path to icon file could be like as below:</p>
<p>components/com_componentname/assets/icons/icon-name.gif</p>
<p>Here, it is always useful to put all the icons files in the assets folder of the component which is used to store all the additional files to provide them as needed.</p>
<div>4) Sub menus will be linked as if you enter proper parent Id for them in the above DB table.</div>
<div>5) Please make sure to update corresponding names with your component details.</div>
<div>Of course, for any query or further assistance &#8211; just write your message and I will be happy to respond ASAP <img src='http://www.viztech.co.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8211; enjoy!!!</div>
]]></content:encoded>
			<wfw:commentRss>http://www.viztech.co.in/blog/how-to-add-menu-and-sub-menu-in-the-joomla-administration-menu-for-a-component/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching using disk
Object Caching 264/278 objects using disk

Served from: www.viztech.co.in @ 2012-02-07 02:53:58 -->
