<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kevinkabatra</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kevinkabatra"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Kevinkabatra"/>
	<updated>2026-09-26T23:34:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232159</id>
		<title>J3.x:Developing an MVC Component/Adding a model to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232159"/>
		<updated>2015-09-18T20:04:50Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: Removed {{underconstruction}} tag&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Model to Hello World! == &lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/models/test.php| test.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/models/test.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/models/index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/models/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Update: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/models/test.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var string message&lt;br /&gt;
	 */&lt;br /&gt;
	protected $message;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
         *&lt;br /&gt;
	 * @return  string  The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getMsg()&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;message))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;message = &#039;Hello World!&#039;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $this-&amp;gt;message;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = $this-&amp;gt;get(&#039;Msg&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,32&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.4&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== test.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This class will be called by the class HelloWorldViewHelloWorld.&lt;br /&gt;
&lt;br /&gt;
=== view.html.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;msg = $this-&amp;gt;get(&#039;Msg&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; class asks the model for data using the &#039;&#039;get&#039;&#039; method of the &#039;&#039;JViewLegacy&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
== Component Contents ==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[#site/models/test.php|site/models/test.php]]&#039;&#039;&lt;br /&gt;
 | file representing the model&lt;br /&gt;
 |-&lt;br /&gt;
 |6&lt;br /&gt;
 | &#039;&#039;[[#site/models/index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 17&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 18&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Contributors == &amp;lt;!--T:21--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a menu type to the site part|Prev: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a variable request in the menu type|Next: Adding a variable request in the menu type&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232158</id>
		<title>J3.x:Developing an MVC Component/Adding a model to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232158"/>
		<updated>2015-09-18T20:04:05Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /*Component Contents */ added section, added my name to list of Contributors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{underconstruction}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Model to Hello World! == &lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/models/test.php| test.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/models/test.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/models/index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/models/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Update: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/models/test.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var string message&lt;br /&gt;
	 */&lt;br /&gt;
	protected $message;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
         *&lt;br /&gt;
	 * @return  string  The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getMsg()&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;message))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;message = &#039;Hello World!&#039;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $this-&amp;gt;message;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = $this-&amp;gt;get(&#039;Msg&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,32&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.4&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== test.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This class will be called by the class HelloWorldViewHelloWorld.&lt;br /&gt;
&lt;br /&gt;
=== view.html.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;msg = $this-&amp;gt;get(&#039;Msg&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; class asks the model for data using the &#039;&#039;get&#039;&#039; method of the &#039;&#039;JViewLegacy&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
== Component Contents ==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[#site/models/test.php|site/models/test.php]]&#039;&#039;&lt;br /&gt;
 | file representing the model&lt;br /&gt;
 |-&lt;br /&gt;
 |6&lt;br /&gt;
 | &#039;&#039;[[#site/models/index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 17&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 18&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Contributors == &amp;lt;!--T:21--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a menu type to the site part|Prev: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a variable request in the menu type|Next: Adding a variable request in the menu type&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232149</id>
		<title>J3.x:Developing an MVC Component/Adding a model to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232149"/>
		<updated>2015-09-18T19:55:47Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: Finished Adding a Model to Hello World!, File Details, and Code Explanation sections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{underconstruction}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Model to Hello World! == &lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/models/test.php| test.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/models/test.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/models/index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/models/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Update: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/models/test.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var string message&lt;br /&gt;
	 */&lt;br /&gt;
	protected $message;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
         *&lt;br /&gt;
	 * @return  string  The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getMsg()&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;message))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;message = &#039;Hello World!&#039;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $this-&amp;gt;message;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = $this-&amp;gt;get(&#039;Msg&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,32&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.4&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== test.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This class will be called by the class HelloWorldViewHelloWorld.&lt;br /&gt;
&lt;br /&gt;
=== view.html.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;msg = $this-&amp;gt;get(&#039;Msg&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; class asks the model for data using the &#039;&#039;get&#039;&#039; method of the &#039;&#039;JViewLegacy&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Packaging the component == &amp;lt;!--T:27--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Contributors == &amp;lt;!--T:21--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a menu type to the site part|Prev: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a variable request in the menu type|Next: Adding a variable request in the menu type&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions&amp;diff=232146</id>
		<title>Absolute Basics of How a Component Functions</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions&amp;diff=232146"/>
		<updated>2015-09-18T19:46:50Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is designed for Joomlaǃ beginners; it is designed to explain what a Joomlaǃ component is, and how it functions. When a specific component example will benefit the tutorial, this article will refer to an example component named Hello Worldǃ.&lt;br /&gt;
&lt;br /&gt;
==What is a Joomlaǃ Component==&lt;br /&gt;
A component is a kind of Joomla! extension. Components are the main functional units of Joomla!; they can be seen as mini-applications. An easy analogy would be that Joomla! is the operating system and the components are desktop applications. Created by a component, content is usually displayed in the center of the main content area of a template (depending on the template).&lt;br /&gt;
&lt;br /&gt;
Most components have two main parts: an administrator part and a site part. The site part is what is used to render pages of your site when they are requested by your site visitors during normal site operation. The administrator part provides an interface to configure and manage different aspects of the component and is accessible through the Joomla! administrator application.&lt;br /&gt;
&lt;br /&gt;
In the Joomla! framework, components can be designed using a flat model(returns HTML code for the requested page) or Model-View-Controller (herein referred to as MVC) pattern.&lt;br /&gt;
&lt;br /&gt;
==Introduction to MVC==&lt;br /&gt;
MVC is a software design pattern that can be used to organize code in such a way that the business logic and data presentation are seperate. The premise behind this approach is that if the business logic is grouped into one section, then the interface and user interaction that surrounds the data can be revised and customized without having to reprogram the business logic. MVC was originally developed to map the traditional input, processing, output roles into a logical GUI architecture.&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
The model is the part of the component that encapsulates the application&#039;s data. It will often provide routines to manage and manipulate this data in a meaningful way in addition to routines that retrieve the data from the model. In general, the underlying data access technique should be encapsulated in the model. In this way, if an application is to be moved from a system that utilizes a flat file to store its information to as system that uses a database, the model is the only element that needs to be changed, not the view or the controller.&lt;br /&gt;
&lt;br /&gt;
===View===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a get function. It returns data to the caller. For this example, the caller will be the HelloWorldViewHelloWorld view. By default, the model named HelloWorldModelHelloWorld residing in site/models/helloworld.php is the main model associated to this view.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic, that make everything work:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
So let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access &lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Hello World! example: &amp;lt;tt&amp;gt;localhost/joomla/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access &lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&amp;lt;tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Hello World! example: &amp;lt;tt&amp;gt;localhost/joomla/index.php?option=com_helloworld&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_&amp;lt;component_name&amp;gt;/&amp;lt;tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The Hello World! component would be stored in &amp;lt;tt&amp;gt; &amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/&amp;lt;tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*A html file that allows control of the background colorː &amp;lt;tt&amp;gt;index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that represents the controller itselfː &amp;lt;tt&amp;gt;controller.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that loads the controller classː &amp;lt;tt&amp;gt;&amp;lt;component_name&amp;gt;.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that represents the model itselfː &amp;lt;tt&amp;gt;models/&amp;lt;component_name&amp;gt;.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;models/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file containing the default viewː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A xml file for adding a menu item typeː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file for displaying the viewː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/view.html.php&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
    defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
* [[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Explanations]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Development Recommended Reading]]&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232120</id>
		<title>J3.x:Developing an MVC Component/Adding a model to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232120"/>
		<updated>2015-09-18T19:29:31Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* File Details */ added section, moving all source code into this section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{underconstruction}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Model to Hello World! == &lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/models/test.php| test.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/models/test.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/models/index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/models/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/models/test.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var string message&lt;br /&gt;
	 */&lt;br /&gt;
	protected $message;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
         *&lt;br /&gt;
	 * @return  string  The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getMsg()&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;message))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;message = &#039;Hello World!&#039;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $this-&amp;gt;message;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Adding a model == &amp;lt;!--T:4--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. In our case, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic, that make everything work:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
So let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
So back to the actual implementation of the single classes:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor put a &#039;&#039;site/models/helloworld.php&#039;&#039; file containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
The &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; class asks the model for data using the &#039;&#039;get&#039;&#039; method of the &#039;&#039;JViewLegacy&#039;&#039; class:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;site/views/helloworld/view.html.php&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = $this-&amp;gt;get(&#039;Msg&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
Note: $this-&amp;gt;get() is a member of JViewLegacy::get which is a proxy to get* methods of the default model where * is populated with the value of the first parameter passed to get()&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Also modify your &#039;&#039;helloworld.xml&#039;&#039; file to indicate use of models and the new version:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;helloworld.xml&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,32&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.4&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Packaging the component == &amp;lt;!--T:27--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Contributors == &amp;lt;!--T:21--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a menu type to the site part|Prev: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a variable request in the menu type|Next: Adding a variable request in the menu type&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232087</id>
		<title>J3.x:Developing an MVC Component/Adding a model to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232087"/>
		<updated>2015-09-18T19:24:40Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a Model to Hello World! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{underconstruction}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Model to Hello World! == &lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/models/test.php| test.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/models/test.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/models/index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/models/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Adding a model == &amp;lt;!--T:4--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. In our case, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic, that make everything work:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
So let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
So back to the actual implementation of the single classes:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor put a &#039;&#039;site/models/helloworld.php&#039;&#039; file containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;site/models/helloworld.php&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var string message&lt;br /&gt;
	 */&lt;br /&gt;
	protected $message;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
         *&lt;br /&gt;
	 * @return  string  The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getMsg()&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;message))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;message = &#039;Hello World!&#039;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $this-&amp;gt;message;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
The &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; class asks the model for data using the &#039;&#039;get&#039;&#039; method of the &#039;&#039;JViewLegacy&#039;&#039; class:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;site/views/helloworld/view.html.php&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = $this-&amp;gt;get(&#039;Msg&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
Note: $this-&amp;gt;get() is a member of JViewLegacy::get which is a proxy to get* methods of the default model where * is populated with the value of the first parameter passed to get()&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Also modify your &#039;&#039;helloworld.xml&#039;&#039; file to indicate use of models and the new version:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;helloworld.xml&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,32&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.4&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Packaging the component == &amp;lt;!--T:27--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Contributors == &amp;lt;!--T:21--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a menu type to the site part|Prev: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a variable request in the menu type|Next: Adding a variable request in the menu type&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232018</id>
		<title>J3.x:Developing an MVC Component/Adding a model to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232018"/>
		<updated>2015-09-18T19:12:49Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: Added {{underconstruction}} tag, major revisions to article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{underconstruction}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Model to Hello World! == &lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Adding a model == &amp;lt;!--T:4--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. In our case, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic, that make everything work:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
So let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
So back to the actual implementation of the single classes:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor put a &#039;&#039;site/models/helloworld.php&#039;&#039; file containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;site/models/helloworld.php&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var string message&lt;br /&gt;
	 */&lt;br /&gt;
	protected $message;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
         *&lt;br /&gt;
	 * @return  string  The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getMsg()&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;message))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;message = &#039;Hello World!&#039;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $this-&amp;gt;message;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
The &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; class asks the model for data using the &#039;&#039;get&#039;&#039; method of the &#039;&#039;JViewLegacy&#039;&#039; class:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;site/views/helloworld/view.html.php&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = $this-&amp;gt;get(&#039;Msg&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
Note: $this-&amp;gt;get() is a member of JViewLegacy::get which is a proxy to get* methods of the default model where * is populated with the value of the first parameter passed to get()&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Also modify your &#039;&#039;helloworld.xml&#039;&#039; file to indicate use of models and the new version:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;helloworld.xml&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,32&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.4&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Packaging the component == &amp;lt;!--T:27--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Contributors == &amp;lt;!--T:21--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a menu type to the site part|Prev: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a variable request in the menu type|Next: Adding a variable request in the menu type&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions&amp;diff=232013</id>
		<title>Absolute Basics of How a Component Functions</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions&amp;diff=232013"/>
		<updated>2015-09-18T19:06:39Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Joomla! Component Framework Explained */ added section, Added information on the Joomla! framework, removing it from https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is designed for Joomlaǃ beginners; it is designed to explain what a Joomlaǃ component is, and how it functions. When a specific component example will benefit the tutorial, this article will refer to an example component named Hello Worldǃ.&lt;br /&gt;
&lt;br /&gt;
==What is a Joomlaǃ Component==&lt;br /&gt;
A component is a kind of Joomla! extension. Components are the main functional units of Joomla!; they can be seen as mini-applications. An easy analogy would be that Joomla! is the operating system and the components are desktop applications. Created by a component, content is usually displayed in the center of the main content area of a template (depending on the template).&lt;br /&gt;
&lt;br /&gt;
Most components have two main parts: an administrator part and a site part. The site part is what is used to render pages of your site when they are requested by your site visitors during normal site operation. The administrator part provides an interface to configure and manage different aspects of the component and is accessible through the Joomla! administrator application.&lt;br /&gt;
&lt;br /&gt;
In the Joomla! framework, components can be designed using a flat model(returns HTML code for the requested page) or Model-View-Controller (herein referred to as MVC) pattern.&lt;br /&gt;
&lt;br /&gt;
==Introduction to MVC==&lt;br /&gt;
MVC is a software design pattern that can be used to organize code in such a way that the business logic and data presentation are seperate. The premise behind this approach is that if the business logic is grouped into one section, then the interface and user interaction that surrounds the data can be revised and customized without having to reprogram the business logic. MVC was originally developed to map the traditional input, processing, output roles into a logical GUI architecture.&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
The model is the part of the component that encapsulates the application&#039;s data. It will often provide routines to manage and manipulate this data in a meaningful way in addition to routines that retrieve the data from the model. In general, the underlying data access technique should be encapsulated in the model. In this way, if an application is to be moved from a system that utilizes a flat file to store its information to as system that uses a database, the model is the only element that needs to be changed, not the view or the controller.&lt;br /&gt;
&lt;br /&gt;
===View===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
&lt;br /&gt;
== Joomla! Component Framework Explained ==&lt;br /&gt;
&lt;br /&gt;
=== Model ===&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a get function. It returns data to the caller. For this example, the caller will be the HelloWorldViewHelloWorld view. By default, the model named HelloWorldModelHelloWorld residing in site/models/helloworld.php is the main model associated to this view.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic, that make everything work:&lt;br /&gt;
&lt;br /&gt;
The class HelloWorldViewHelloWorld resides in site/views/helloworld/view.html.php and will make use of the class HelloWorldModelHelloWorld in the file site/models/helloworld.php&lt;br /&gt;
&lt;br /&gt;
So let&#039;s just assume we want to use an imaginary view fluffy, you would have to have:&lt;br /&gt;
&lt;br /&gt;
The class HelloWorldViewFluffy which resides in site/views/fluffy/view.html.php. The view will make use of HelloWorldModelFluffy in the file site/models/fluffy.php. Note: the actual screen of the view: site/views/fluffy/tmpl/default.php is required as well to make this example work.&lt;br /&gt;
&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&lt;br /&gt;
&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access &lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Hello World! example: &amp;lt;tt&amp;gt;localhost/joomla/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access &lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&amp;lt;tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Hello World! example: &amp;lt;tt&amp;gt;localhost/joomla/index.php?option=com_helloworld&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_&amp;lt;component_name&amp;gt;/&amp;lt;tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The Hello World! component would be stored in &amp;lt;tt&amp;gt; &amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/&amp;lt;tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*A html file that allows control of the background colorː &amp;lt;tt&amp;gt;index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that represents the controller itselfː &amp;lt;tt&amp;gt;controller.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that loads the controller classː &amp;lt;tt&amp;gt;&amp;lt;component_name&amp;gt;.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that represents the model itselfː &amp;lt;tt&amp;gt;models/&amp;lt;component_name&amp;gt;.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;models/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file containing the default viewː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A xml file for adding a menu item typeː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file for displaying the viewː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/view.html.php&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
    defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
* [[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Explanations]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Development Recommended Reading]]&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions&amp;diff=232009</id>
		<title>Absolute Basics of How a Component Functions</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions&amp;diff=232009"/>
		<updated>2015-09-18T18:56:28Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is designed for Joomlaǃ beginners; it is designed to explain what a Joomlaǃ component is, and how it functions. When a specific component example will benefit the tutorial, this article will refer to an example component named Hello Worldǃ.&lt;br /&gt;
&lt;br /&gt;
==What is a Joomlaǃ Component==&lt;br /&gt;
A component is a kind of Joomla! extension. Components are the main functional units of Joomla!; they can be seen as mini-applications. An easy analogy would be that Joomla! is the operating system and the components are desktop applications. Created by a component, content is usually displayed in the center of the main content area of a template (depending on the template).&lt;br /&gt;
&lt;br /&gt;
Most components have two main parts: an administrator part and a site part. The site part is what is used to render pages of your site when they are requested by your site visitors during normal site operation. The administrator part provides an interface to configure and manage different aspects of the component and is accessible through the Joomla! administrator application.&lt;br /&gt;
&lt;br /&gt;
In the Joomla! framework, components can be designed using a flat model(returns HTML code for the requested page) or Model-View-Controller (herein referred to as MVC) pattern.&lt;br /&gt;
&lt;br /&gt;
==Introduction to MVC==&lt;br /&gt;
MVC is a software design pattern that can be used to organize code in such a way that the business logic and data presentation are seperate. The premise behind this approach is that if the business logic is grouped into one section, then the interface and user interaction that surrounds the data can be revised and customized without having to reprogram the business logic. MVC was originally developed to map the traditional input, processing, output roles into a logical GUI architecture.&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
The model is the part of the component that encapsulates the application&#039;s data. It will often provide routines to manage and manipulate this data in a meaningful way in addition to routines that retrieve the data from the model. In general, the underlying data access technique should be encapsulated in the model. In this way, if an application is to be moved from a system that utilizes a flat file to store its information to as system that uses a database, the model is the only element that needs to be changed, not the view or the controller.&lt;br /&gt;
&lt;br /&gt;
===View===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access &lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Hello World! example: &amp;lt;tt&amp;gt;localhost/joomla/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access &lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&amp;lt;tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Hello World! example: &amp;lt;tt&amp;gt;localhost/joomla/index.php?option=com_helloworld&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_&amp;lt;component_name&amp;gt;/&amp;lt;tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The Hello World! component would be stored in &amp;lt;tt&amp;gt; &amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/&amp;lt;tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*A html file that allows control of the background colorː &amp;lt;tt&amp;gt;index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that represents the controller itselfː &amp;lt;tt&amp;gt;controller.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that loads the controller classː &amp;lt;tt&amp;gt;&amp;lt;component_name&amp;gt;.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that represents the model itselfː &amp;lt;tt&amp;gt;models/&amp;lt;component_name&amp;gt;.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;models/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file containing the default viewː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A xml file for adding a menu item typeː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file for displaying the viewː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/view.html.php&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
    defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
* [[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Explanations]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Development Recommended Reading]]&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232005</id>
		<title>J3.x:Developing an MVC Component/Adding a model to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part&amp;diff=232005"/>
		<updated>2015-09-18T18:52:27Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Notes */ added section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Adding a model == &amp;lt;!--T:4--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
In the Joomla framework, models are responsible for managing the data. The first function that has to be written for a model is a &#039;&#039;get&#039;&#039; function. It returns data to the caller. In our case, the caller will be the &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; view. By default, the model named &#039;&#039;HelloWorldModelHelloWorld&#039;&#039; residing in &#039;&#039;site/models/helloworld.php&#039;&#039; is the main model associated to this view.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
So let&#039;s have a quick look at the naming conventions with an example, since the naming convention are the actual magic, that make everything work:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; resides in &#039;&#039;site/views/&#039;&#039;&#039;helloworld&#039;&#039;&#039;/view.html.php&#039;&#039; and will make use of the class &#039;&#039;HelloWorldModel&#039;&#039;&#039;HelloWorld&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;helloworld&#039;&#039;&#039;.php&#039;&#039;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
So let&#039;s just assume we want to use an imaginary view &#039;&#039;fluffy&#039;&#039;, you would have to have:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
The class &#039;&#039;HelloWorldView&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; which resides in &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/view.html.php&#039;&#039;. The view will make use of &#039;&#039;HelloWorldModel&#039;&#039;&#039;Fluffy&#039;&#039;&#039;&#039;&#039; in the file &#039;&#039;site/models/&#039;&#039;&#039;fluffy&#039;&#039;&#039;.php&#039;&#039;. Note: the actual screen of the view: &#039;&#039;site/views/&#039;&#039;&#039;fluffy&#039;&#039;&#039;/tmpl/default.php&#039;&#039; is required as well to make this example work.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Breaking any of these bold conventions will lead to errors or a blank page.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
So back to the actual implementation of the single classes:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor put a &#039;&#039;site/models/helloworld.php&#039;&#039; file containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;site/models/helloworld.php&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var string message&lt;br /&gt;
	 */&lt;br /&gt;
	protected $message;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
         *&lt;br /&gt;
	 * @return  string  The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	public function getMsg()&lt;br /&gt;
	{&lt;br /&gt;
		if (!isset($this-&amp;gt;message))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;message = &#039;Hello World!&#039;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $this-&amp;gt;message;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
The &#039;&#039;HelloWorldViewHelloWorld&#039;&#039; class asks the model for data using the &#039;&#039;get&#039;&#039; method of the &#039;&#039;JViewLegacy&#039;&#039; class:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;site/views/helloworld/view.html.php&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = $this-&amp;gt;get(&#039;Msg&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors), JLog::WARNING, &#039;jerror&#039;);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
Note: $this-&amp;gt;get() is a member of JViewLegacy::get which is a proxy to get* methods of the default model where * is populated with the value of the first parameter passed to get()&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Also modify your &#039;&#039;helloworld.xml&#039;&#039; file to indicate use of models and the new version:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;&#039;&#039;helloworld.xml&#039;&#039;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,32&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.4&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Packaging the component == &amp;lt;!--T:27--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-4-adding-a-site-model.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Contributors == &amp;lt;!--T:21--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a menu type to the site part|Prev: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a variable request in the menu type|Next: Adding a variable request in the menu type&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=232004</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=232004"/>
		<updated>2015-09-18T18:46:09Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a Menu Item to Hello World */ improved tutorial on how to add menu item&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
With the component successfully updated, we need to add the Menu Item. This will be done by using the Menu Manager of Joomla!. &lt;br /&gt;
&lt;br /&gt;
*Using your preferred web browser, navigate to the Administrator panel of your Joomla! site. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/administrator/index.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Click Menu {{rarr}} Manage {{rarr}} Menu Items {{rarr}} New {{rarr}} Select&lt;br /&gt;
*Navigate and Choose &amp;lt;tt&amp;gt;Hello World!&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Navigate and Choose &amp;lt;tt&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLLE&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Click Menu Title and enter &amp;lt;tt&amp;gt;Hello World!&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Click Save &amp;amp; Close&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== default.xml ===&lt;br /&gt;
&lt;br /&gt;
Note - For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== Component Contents ==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |} &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231994</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231994"/>
		<updated>2015-09-18T18:35:57Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Component Contents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== default.xml ===&lt;br /&gt;
&lt;br /&gt;
Note - For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== Component Contents ==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |} &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231993</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231993"/>
		<updated>2015-09-18T18:35:37Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Component Contents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== default.xml ===&lt;br /&gt;
&lt;br /&gt;
Note - For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== Component Contents ==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
 &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231992</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231992"/>
		<updated>2015-09-18T18:35:18Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Component Contents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== default.xml ===&lt;br /&gt;
&lt;br /&gt;
Note - For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== Component Contents ==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=JDOC_talk:Developer_Tutorials_Project&amp;diff=231989</id>
		<title>JDOC talk:Developer Tutorials Project</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=JDOC_talk:Developer_Tutorials_Project&amp;diff=231989"/>
		<updated>2015-09-18T18:32:33Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Developer Tutorials Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Developer Tutorials Project==&lt;br /&gt;
* [[User:Hutchy68|Tom Hutchison]] ([[User talk:Hutchy68|talk]]) 09:37, 11 February 2013 (CST) - page categorisation, wiki markup help, layout, wikification of related pages&lt;br /&gt;
* [[User:Kevinkabatra|Kevinkabatra]] ([[User talk:Kevinkabatra|talk]]) 13:32, 18 September 2015 (CDT) - updating current beginner tutorials to be actually geared toward beginners, anything else that is needed&lt;br /&gt;
&lt;br /&gt;
== Feedback and ideas ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- post your feedback and ideas below --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[User:Poproar|popROAR]] ([[User talk:Poproar|talk]]) 12:22, 4 August 2013 (CDT) - walkthroughs?&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231983</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231983"/>
		<updated>2015-09-18T18:13:15Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* helloworld.xml */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== default.xml ===&lt;br /&gt;
&lt;br /&gt;
Note - For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== Component Contents ==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231980</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231980"/>
		<updated>2015-09-18T18:13:00Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* default.xml */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== default.xml ===&lt;br /&gt;
&lt;br /&gt;
Note - For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== Component Contents ==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231971</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231971"/>
		<updated>2015-09-18T18:09:43Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a Menu Item to Hello World */ fixed typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== default.xml ===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== Component Contents ==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231970</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231970"/>
		<updated>2015-09-18T18:09:19Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a View to Hello World! */ fixed typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. In this tutorial we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a view you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
Note - the same code is used for all folders&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.php ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
=== controller.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
=== view.html.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
=== default.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231958</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231958"/>
		<updated>2015-09-18T17:52:28Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Code Explanation */ added new section, moved all code explanation into the section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== default.xml ===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== Component Contents ==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231957</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231957"/>
		<updated>2015-09-18T17:49:49Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a Menu Item to Hello World */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a menu item you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. You must use the updated directory structure from the last [[J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part | tutorial]]. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/site/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create default.xml ===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions&amp;diff=231956</id>
		<title>Absolute Basics of How a Component Functions</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Absolute_Basics_of_How_a_Component_Functions&amp;diff=231956"/>
		<updated>2015-09-18T17:40:38Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Accessing a Joomlaǃ Component */ added information about Menu, as I am removing the information from https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is designed for Joomlaǃ beginners; it is designed to explain what a Joomlaǃ component is, and how it functions. When a specific component example will benefit the tutorial, this article will refer to an example component named Hello Worldǃ.&lt;br /&gt;
&lt;br /&gt;
==What is a Joomlaǃ Component==&lt;br /&gt;
A component is a kind of Joomla! extension. Components are the main functional units of Joomla!; they can be seen as mini-applications. An easy analogy would be that Joomla! is the operating system and the components are desktop applications. Created by a component, content is usually displayed in the center of the main content area of a template (depending on the template).&lt;br /&gt;
&lt;br /&gt;
Most components have two main parts: an administrator part and a site part. The site part is what is used to render pages of your site when they are requested by your site visitors during normal site operation. The administrator part provides an interface to configure and manage different aspects of the component and is accessible through the Joomla! administrator application.&lt;br /&gt;
&lt;br /&gt;
In the Joomla! framework, components can be designed using a flat model(returns HTML code for the requested page) or Model-View-Controller (herein referred to as MVC) pattern.&lt;br /&gt;
&lt;br /&gt;
==Accessing a Joomlaǃ Component==&lt;br /&gt;
First we need to access the Joomla! platform, which is always accessed through a single point of entry. Using your preferred web browser, navigate to the following URL:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access &lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Hello World! example: &amp;lt;tt&amp;gt;localhost/joomla/index.php&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the URL of the component, or a [[#Menu| Menu]] in order to navigate to the component. In this article we will discuss using the URL.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | user access&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_&amp;lt;component_name&amp;gt;&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | administrator access &lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_&amp;lt;component_name&amp;gt;&amp;lt;tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Hello World! example: &amp;lt;tt&amp;gt;localhost/joomla/index.php?option=com_helloworld&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction to MVC==&lt;br /&gt;
MVC is a software design pattern that can be used to organize code in such a way that the business logic and data presentation are seperate. The premise behind this approach is that if the business logic is grouped into one section, then the interface and user interaction that surrounds the data can be revised and customized without having to reprogram the business logic. MVC was originally developed to map the traditional input, processing, output roles into a logical GUI architecture.&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
The model is the part of the component that encapsulates the application&#039;s data. It will often provide routines to manage and manipulate this data in a meaningful way in addition to routines that retrieve the data from the model. In general, the underlying data access technique should be encapsulated in the model. In this way, if an application is to be moved from a system that utilizes a flat file to store its information to as system that uses a database, the model is the only element that needs to be changed, not the view or the controller.&lt;br /&gt;
&lt;br /&gt;
===View===&lt;br /&gt;
The view is the part of the component that is used to render the data from the model in a manner that is suitable for interaction. For a web-based application, the view would generally be an HTML page that is returned to the user. The view pulls data from the model (which is passed to it from the controller) and feeds the data into a template which is populated and presented to the user. The view does not cause the data to be modified in any way, it only displays the data received from the model.&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
The controller is responsible for responding to user actions. In the case of a web application, a user action is generally a page request. The controller will determine what request is being made by the user and respond appropriately by triggering the model to manipulate the data appropriately and passing the model into the view. The controller does not display the data in the model, it only triggers methods in the model which modify the data, and then pass the model into the view which displays the data.&lt;br /&gt;
&lt;br /&gt;
==MVC Basic Directory Structure==&lt;br /&gt;
Components are stored in a directory within your Joomla! installation, specifically at:&lt;br /&gt;
*&amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_&amp;lt;component_name&amp;gt;/&amp;lt;tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The Hello World! component would be stored in &amp;lt;tt&amp;gt; &amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/&amp;lt;tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
A basic component will contain the following files within its directoryː&lt;br /&gt;
*A html file that allows control of the background colorː &amp;lt;tt&amp;gt;index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that represents the controller itselfː &amp;lt;tt&amp;gt;controller.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that loads the controller classː &amp;lt;tt&amp;gt;&amp;lt;component_name&amp;gt;.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file that represents the model itselfː &amp;lt;tt&amp;gt;models/&amp;lt;component_name&amp;gt;.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;models/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file containing the default viewː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/default.php&amp;lt;tt&amp;gt;&lt;br /&gt;
*A xml file for adding a menu item typeː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/tmpl/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*Another html file for background controlː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/index.html&amp;lt;tt&amp;gt;&lt;br /&gt;
*A php file for displaying the viewː &amp;lt;tt&amp;gt;views/&amp;lt;component_name&amp;gt;/view.html.php&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==JEXEC==&lt;br /&gt;
The following line is commonly found at the start of Joomla! PHP files:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
    defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
==Tutorials on Designing a MVC Component==&lt;br /&gt;
To learn how to design your own MVC Component, please complete the tutorial for your Joomla! version.&lt;br /&gt;
* [[J1.5:Developing_a_MVC_Component/Introduction| Joomla! 1.5]]&lt;br /&gt;
* [[J2.5:Developing_a_MVC_Component| Joomla! 2.5]]&lt;br /&gt;
* [[J3.x:Developing_an_MVC_Component/Introduction| Joomla! 3.x]]&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
* [[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Explanations]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Development Recommended Reading]]&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231955</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231955"/>
		<updated>2015-09-18T17:31:10Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a Menu Item to Hello World */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. As with the last tutorial, we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Create default.xml ===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231954</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231954"/>
		<updated>2015-09-18T17:28:58Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: Added git request&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. In this tutorial we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a view you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
Note - the same code is used for all folders&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.php ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
=== controller.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
=== view.html.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
=== default.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231953</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231953"/>
		<updated>2015-09-18T17:21:31Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Code Explanation */ added new section, moved all code explanation into the section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. In this tutorial we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a view you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
Note - the same code is used for all folders&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation ==&lt;br /&gt;
In case you were curious as to why this works the way it does.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.php ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
=== controller.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
=== view.html.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
=== default.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231952</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231952"/>
		<updated>2015-09-18T17:16:30Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a View to Hello World! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. In this tutorial we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a view you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
Note - the same code is used for all folders&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231951</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231951"/>
		<updated>2015-09-18T17:16:04Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a View to Hello World! */ fixed typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. In this tutorial we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a view you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. Using your favorite file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
Note - the same code is used for all folders&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231950</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231950"/>
		<updated>2015-09-18T17:15:23Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a View to Hello World! */ expanded instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. In this tutorial we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a view you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;tt&amp;gt;, which is the original directory we made for our component. Using your favorite file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Updating the Hello World! Component ===&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
Note - the same code is used for all folders&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component&amp;diff=231949</id>
		<title>J3.x:Developing an MVC Component/Developing a Basic Component</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component&amp;diff=231949"/>
		<updated>2015-09-18T17:10:13Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* How to add a component to Joomla! */ minor update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Notes ==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* If you have used Joomla! before reading this tutorial, you have noticed that extensions are installed using a compressed file containing all the things which are needed for installing and uninstalling them.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to create the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-1-basic-component.zip archive]&lt;br /&gt;
&lt;br /&gt;
== How to add a component to Joomla! ==&lt;br /&gt;
In this article we will cover how to create and install a basic Joomla! component. For this example we will be working with the Hello World! component.&lt;br /&gt;
&lt;br /&gt;
To begin, you must first use your preferred file manager to create a directory for the Hello World! component. This directory can be anywhere on your file system, as long as it outside of your Joomla! installation directory. For this example we will name the directory &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, but this directory can be named anything.&lt;br /&gt;
&lt;br /&gt;
Next, inside this directory we need to create some files. Using your preferred file manager, create the following files; as you create the files, add the source code for each file which is found in &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Installing the Hello World! Component ===&lt;br /&gt;
Using your preferred file manager, create a .zip file of this directory. For this example we will name the file &amp;lt;tt&amp;gt;com_helloworld.zip&amp;lt;/tt&amp;gt;, again this file could have been named anything.&lt;br /&gt;
&lt;br /&gt;
Now we need to install the Hello World! component. There are two ways to do this, both are covered in [[Installing an extension| Installing an Extension]]. Here we will cover the method using the Extension Manager of Joomla!. &lt;br /&gt;
&lt;br /&gt;
*Using your preferred web browser, navigate to the Administrator panel of your Joomla! site. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/administrator/index.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Click Extensions {{rarr}} Manage {{rarr}} Install {{rarr}} Upload Package File {{rarr}} Choose File&lt;br /&gt;
*Navigate and Select File&lt;br /&gt;
*Click Upload &amp;amp; Install&lt;br /&gt;
&lt;br /&gt;
Note - You should see a message letting you know if the installation succeeded or failed. &lt;br /&gt;
&lt;br /&gt;
You can test this basic function of the component by entering the Hello World! page for the site and administrator portions of your Joomla! website.&lt;br /&gt;
* Using your preferred web browser, navigate to the Hello World! component page located on the site portion of your website. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Using your preferred web browser, navigate to the Hello World! component page located on the administrator portion of your website. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/administrator/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can also notice that the &#039;&#039;Hello World!&#039;&#039; component is visible in the administrator site of your Joomla installation under the &#039;&#039;Components&#039;&#039; menu.&lt;br /&gt;
&lt;br /&gt;
==File Details== &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{vanchor|admin/sql/updates/mysql/0.0.1.sql}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
is an empty file allowing to initialise schema version of the com_helloworld component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.1&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
Hello World&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|admin/helloworld.php}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
Hello World administration&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
common to all folders&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
== Contributors ==&lt;br /&gt;
* [[User:Ribafs|Ribafs]]&lt;br /&gt;
* [[User:Cdemko|Christophe Demko]]&lt;br /&gt;
* [[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Prev: Introduction&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Next: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231948</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231948"/>
		<updated>2015-09-18T16:52:47Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a View to Hello World! */ updated links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. In this tutorial we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a view you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | Create: [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
Note - the same code is used for all folders&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231947</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231947"/>
		<updated>2015-09-18T16:51:48Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* File Details */ added code for index.html&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. In this tutorial we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a view you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#site/views/helloworld/index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
Note - the same code is used for all folders&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231946</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231946"/>
		<updated>2015-09-18T16:50:29Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a View to Hello World! */ added information for how to actually update a Joomla! website. Expanded tutorial steps to include index.html creations.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&lt;br /&gt;
&lt;br /&gt;
There are several ways to update a Joomla! component. In this tutorial we will focus option 2.&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | Update using the Joomla! Extension Manager and an [[Deploying_an_Update_Server| Update Server]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
To add a view you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#site/views/helloworld/index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231466</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231466"/>
		<updated>2015-09-17T21:15:41Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Component Contents */ updated section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Create default.xml ===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
 | file that adds menu item&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 16&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231465</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231465"/>
		<updated>2015-09-17T21:08:52Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Update helloworld.xml */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Create default.xml ===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231464</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231464"/>
		<updated>2015-09-17T21:08:23Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* File Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Create default.xml ===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231463</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231463"/>
		<updated>2015-09-17T21:07:29Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: Major revision. Re-designed article to follow tutorial patterns.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Adding a Menu Item to Hello World ==&lt;br /&gt;
In the Joomla! framework, components are executed using menu items. These items are links on your Joomla! page, that open a specific page of your component. To add a menu item you will need to:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Create: [[#site/views/helloworld/tmpl/default.xml| default.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=== Create default.xml ===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;htdocs/components/com_helloworld/views/helloworld/tmpl/default.xml&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
== File Details ==&lt;br /&gt;
{{vanchor|site/views/helloworld/tml/default.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
 You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributors == &lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231461</id>
		<title>J3.x:Developing an MVC Component/Adding a menu type to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part&amp;diff=231461"/>
		<updated>2015-09-17T20:44:12Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Notes */ added section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive]&lt;br /&gt;
&lt;br /&gt;
== Abstract == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
Generally speaking, this article describes how to get a link on your joomla page to open a specific page of your component. This gets simply done by adding an xml file to your specific page into your view folder.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
E.g.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/helloworld/tmpl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
Contains your view page &amp;lt;tt&amp;gt;default.php&amp;lt;/tt&amp;gt; that we want to open.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
A file &amp;lt;tt&amp;gt;default.xml&amp;lt;/tt&amp;gt; is placed next to this file with some xml. This makes joomla able to recognize the view file &amp;lt;tt&amp;gt;default.php&amp;lt;/tt&amp;gt; as a menu item.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Adding a menu item type == &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
In the Joomla framework, components are executed using menu items. If you go in the menu manager of your Joomla installation a &#039;&#039;HelloWorld&#039;&#039; menu item type does not yet exist. Adding this functionality is easy in Joomla. Simply put a &amp;lt;tt&amp;gt;site/views/helloworld/tmpl/default.xml&amp;lt;/tt&amp;gt; file containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/tmpl/default.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;site/views/helloworld/tmpl/default.xml&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
For the moment the strings won&#039;t be translated in the administrator interface. We will see in a later article how translation is performed.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
Also modify your &amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt; file to indicate a new version:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;helloworld.xml&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2014&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.3&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Packaging the component == &amp;lt;!--T:14--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
If you haven&#039;t already done so from the previous lessons, create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-3-adding-a-site-menu.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend. To do so select &amp;quot;Add New Menu Item&amp;quot; from the one of the menus in the &amp;quot;Menus&amp;quot; menu; then you can select COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE for Menu Item Type. Once selected you can see the Link information is populated with the URL for the view.&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[File:Com_helloworld_v3-0.0.3.png|thumb|center|400px|&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Selecting the Menu Item Type&amp;lt;/translate&amp;gt;]]&lt;br /&gt;
{{-}}&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Contributors == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Jossnaz|Lukas Meier]]&lt;br /&gt;
*[[User:betweenbrain|Matt Thomas]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Prev: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_model_to_the_site_part|Next: Adding a model to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231460</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231460"/>
		<updated>2015-09-17T20:22:22Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: Removed review tag. If further updates are needed, feel free to update or post in talk section with request.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
To add a view we begin by creating a controller, you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231458</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231458"/>
		<updated>2015-09-17T19:34:31Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* File Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
To add a view we begin by creating a controller, you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231457</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231457"/>
		<updated>2015-09-17T19:33:46Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* File Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
To add a view we begin by creating a controller, you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;all&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231456</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231456"/>
		<updated>2015-09-17T19:31:59Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* File Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
To add a view we begin by creating a controller, you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231455</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231455"/>
		<updated>2015-09-17T19:30:24Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Component Contents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
To add a view we begin by creating a controller, you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | file representing the controller&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | file representing the view&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | the default view&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231454</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231454"/>
		<updated>2015-09-17T19:28:44Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Component Contents */ added section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
To add a view we begin by creating a controller, you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Update: [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 |&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 |&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | &lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component&amp;diff=231453</id>
		<title>J3.x:Developing an MVC Component/Developing a Basic Component</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component&amp;diff=231453"/>
		<updated>2015-09-17T19:13:04Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Component Contents */ added section, this section will become useful later in the tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Notes ==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* If you have used Joomla! before reading this tutorial, you have noticed that extensions are installed using a compressed file containing all the things which are needed for installing and uninstalling them.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to create the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-1-basic-component.zip archive]&lt;br /&gt;
&lt;br /&gt;
== How to add a component to Joomla! ==&lt;br /&gt;
In this article we will cover how to create and install a basic Joomla! component. For this example we will be working with the Hello World! component.&lt;br /&gt;
&lt;br /&gt;
To begin, you must first use your preferred file manager to create a directory for the Hello World! component. This directory can be anywhere on your file system, as long as it outside of your Joomla! installation directory. For this example we will name the directory &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, but this directory can be named anything.&lt;br /&gt;
&lt;br /&gt;
Next, inside this directory we need to create some files. Using your preferred file manager, create the following files; as you create the files, add the source code for each file which is found in &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Using your preferred file manager, create a .zip file of this directory. For this example we will name the file &amp;lt;tt&amp;gt;com_helloworld.zip&amp;lt;/tt&amp;gt;, again this file could have been named anything.&lt;br /&gt;
&lt;br /&gt;
Now we need to install the Hello World! component. There are two ways to do this, both are covered in [[Installing an extension| Installing an Extension]]. Here we will cover the method using the Extension Manager of Joomla!. &lt;br /&gt;
&lt;br /&gt;
*Using your preferred web browser, navigate to the Administrator panel of your Joomla! site. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/administrator/index.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Click Extensions {{rarr}} Manage {{rarr}} Install {{rarr}} Upload Package File {{rarr}} Choose File&lt;br /&gt;
*Navigate and Select File&lt;br /&gt;
*Click Upload &amp;amp; Install&lt;br /&gt;
&lt;br /&gt;
Note - You should see a message letting you know if the installation succeeded or failed. &lt;br /&gt;
&lt;br /&gt;
You can test this basic function of the component by entering the Hello World! page for the site and administrator portions of your Joomla! website.&lt;br /&gt;
* Using your preferred web browser, navigate to the Hello World! component page located on the site portion of your website. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Using your preferred web browser, navigate to the Hello World! component page located on the administrator portion of your website. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/administrator/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can also notice that the &#039;&#039;Hello World!&#039;&#039; component is visible in the administrator site of your Joomla installation under the &#039;&#039;Components&#039;&#039; menu.&lt;br /&gt;
&lt;br /&gt;
==File Details== &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{vanchor|admin/sql/updates/mysql/0.0.1.sql}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
is an empty file allowing to initialise schema version of the com_helloworld component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.1&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
Hello World&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|admin/helloworld.php}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
Hello World administration&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
common to all folders&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents==&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
== Contributors ==&lt;br /&gt;
* [[User:Ribafs|Ribafs]]&lt;br /&gt;
* [[User:Cdemko|Christophe Demko]]&lt;br /&gt;
* [[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Prev: Introduction&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Next: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231452</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231452"/>
		<updated>2015-09-17T19:09:10Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a View to Hello World! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
To add a view we begin by creating a controller, you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Update: [[#site/helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Packaging the component == &amp;lt;!--T:32--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231451</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231451"/>
		<updated>2015-09-17T19:08:47Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a View to Hello World! */ Added links to source code, to match how previous tutorial is designed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
To add a view we begin by creating a controller, you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create: [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create: [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create: [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Update: [[#site/helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;. &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Packaging the component == &amp;lt;!--T:32--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231450</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231450"/>
		<updated>2015-09-17T19:06:22Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* Adding a View to Hello World! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
To add a view we begin by creating a controller, you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create:&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create:&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create:&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Update:&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;. &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Packaging the component == &amp;lt;!--T:32--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231449</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231449"/>
		<updated>2015-09-17T19:03:54Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: Major Revision. Tutorial redesigned to be geared towards beginners.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&lt;br /&gt;
==Adding a View to Hello World!==&lt;br /&gt;
To add a view we begin by creating a controller, you will need to:&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | Update&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | Create:&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | Create:&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | Create:&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | Update:&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;. &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.php===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&lt;br /&gt;
&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.&lt;br /&gt;
&lt;br /&gt;
===Create controller.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&lt;br /&gt;
&lt;br /&gt;
===Create view.html.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&lt;br /&gt;
&lt;br /&gt;
===Create default.php===&lt;br /&gt;
Using your preferred file editor, create &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt; and include the source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&lt;br /&gt;
&lt;br /&gt;
===Update helloworld.xml===&lt;br /&gt;
Using your preferred file editor, open &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt; and include the revised source code as found &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Code Explanation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updates the version number&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&lt;br /&gt;
&lt;br /&gt;
==File Details==&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Packaging the component == &amp;lt;!--T:32--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component&amp;diff=231439</id>
		<title>J3.x:Developing an MVC Component/Developing a Basic Component</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component&amp;diff=231439"/>
		<updated>2015-09-17T17:24:47Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: /* How to add a component to Joomla! */  Adding link to File Details section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Notes ==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
* If you have used Joomla! before reading this tutorial, you have noticed that extensions are installed using a compressed file containing all the things which are needed for installing and uninstalling them.&lt;br /&gt;
&lt;br /&gt;
* You can follow the steps below to create the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-1-basic-component.zip archive]&lt;br /&gt;
&lt;br /&gt;
== How to add a component to Joomla! ==&lt;br /&gt;
In this article we will cover how to create and install a basic Joomla! component. For this example we will be working with the Hello World! component.&lt;br /&gt;
&lt;br /&gt;
To begin, you must first use your preferred file manager to create a directory for the Hello World! component. This directory can be anywhere on your file system, as long as it outside of your Joomla! installation directory. For this example we will name the directory &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, but this directory can be named anything.&lt;br /&gt;
&lt;br /&gt;
Next, inside this directory we need to create some files. Using your preferred file manager, create the following files; as you create the files, add the source code for each file which is found in &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | this is an XML (manifest) file that tells Joomla! how to install our component.&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the site entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | this is the administrator entry point to the Hello World! component&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | prevents web server from listing directory content&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | file allowing to initialise schema version of the com_helloworld component.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Using your preferred file manager, create a .zip file of this directory. For this example we will name the file &amp;lt;tt&amp;gt;com_helloworld.zip&amp;lt;/tt&amp;gt;, again this file could have been named anything.&lt;br /&gt;
&lt;br /&gt;
Now we need to install the Hello World! component. There are two ways to do this, both are covered in [[Installing an extension| Installing an Extension]]. Here we will cover the method using the Extension Manager of Joomla!. &lt;br /&gt;
&lt;br /&gt;
*Using your preferred web browser, navigate to the Administrator panel of your Joomla! site. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/administrator/index.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Click Extensions {{rarr}} Manage {{rarr}} Install {{rarr}} Upload Package File {{rarr}} Choose File&lt;br /&gt;
*Navigate and Select File&lt;br /&gt;
*Click Upload &amp;amp; Install&lt;br /&gt;
&lt;br /&gt;
Note - You should see a message letting you know if the installation succeeded or failed. &lt;br /&gt;
&lt;br /&gt;
You can test this basic function of the component by entering the Hello World! page for the site and administrator portions of your Joomla! website.&lt;br /&gt;
* Using your preferred web browser, navigate to the Hello World! component page located on the site portion of your website. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Using your preferred web browser, navigate to the Hello World! component page located on the administrator portion of your website. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/administrator/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can also notice that the &#039;&#039;Hello World!&#039;&#039; component is visible in the administrator site of your Joomla installation under the &#039;&#039;Components&#039;&#039; menu.&lt;br /&gt;
&lt;br /&gt;
==File Details== &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{vanchor|admin/sql/updates/mysql/0.0.1.sql}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
is an empty file allowing to initialise schema version of the com_helloworld component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.1&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
Hello World&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|admin/helloworld.php}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
Hello World administration&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
common to all folders&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Contributors ===&lt;br /&gt;
* [[User:Ribafs|Ribafs]]&lt;br /&gt;
* [[User:Cdemko|Christophe Demko]]&lt;br /&gt;
* [[User:Kevinkabatra|Kevin Kabatra]]&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Prev: Introduction&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Next: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231438</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=231438"/>
		<updated>2015-09-17T16:43:45Z</updated>

		<summary type="html">&lt;p&gt;Kevinkabatra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Note==&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
In the Joomla!3.x framework, third party component authors divide their code into three main parts:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
* &#039;&#039;models&#039;&#039; They manage the data&amp;lt;/translate&amp;gt; &lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
* &#039;&#039;controllers&#039;&#039; They perform tasks, set and get the states of the models and ask the views to display&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
* &#039;&#039;views&#039;&#039; They display the content according to the type (&#039;&#039;error&#039;&#039;, &#039;&#039;feed&#039;&#039;, &#039;&#039;html&#039;&#039;, &#039;&#039;json&#039;&#039;, &#039;&#039;raw&#039;&#039;, &#039;&#039;xml&#039;&#039;) and the layout chosen by the controllers.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Setting the controller == &amp;lt;!--T:13--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
In the core code of Joomla, there is a class able to manage controllers: &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039;. This class has to be extended to be used in our component. In the file &amp;lt;tt&amp;gt;yoursite/components/com_helloworld/helloworld.php&amp;lt;/tt&amp;gt; (entry point of our &#039;&#039;Hello World&#039;&#039; component), put these lines:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in an aptly named file called &amp;lt;tt&amp;gt;yoursite/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; (it&#039;s a default behavior).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
Now, &amp;lt;tt&amp;gt;controller.php&amp;lt;/tt&amp;gt; needs to be created and &#039;&#039;HelloWorldController&#039;&#039; needs to be declared and defined. So with your favourite file manager and editor, create a &amp;lt;tt&amp;gt;yoursite/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt; file containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the &#039;&#039;display&#039;&#039; task by default. The &#039;&#039;JControllerLegacy&#039;&#039; class has such a task. In our example, it will display a view named &#039;&#039;HelloWorld&#039;&#039;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
So with &#039;&#039;task&#039;&#039; simply a public function display() of &#039;&#039;JControllerLegacy&#039;&#039; is refered to.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
Just a side note for completion, you could call another function aside from &#039;&#039;display()&#039;&#039; by using an URL like this one:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;http://localhost/index.php?option=com_helloworld&amp;amp;task=insert&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
This would try to call a function &#039;&#039;insert()&#039;&#039; of our controller (which we would actually have to implement in &#039;&#039;HelloWorldController&#039;&#039; ).&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Setting the view == &amp;lt;!--T:21--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
When JControllerLegacy wants to display a view, it will look for certain files in the &amp;lt;tt&amp;gt;yoursite/components/com_[component_name]/views/[name of view]/&amp;lt;/tt&amp;gt; folder.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
The name of the folder of the default view is the name of the component itself. In our case the path is &amp;lt;tt&amp;gt;yoursite/components/com_helloworld/views/helloworld/&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
The file that will contain the code of the view is called &amp;lt;tt&amp;gt;view.[view_mode].php&amp;lt;/tt&amp;gt;. The default view mode, and probably the only view a component might need is the &#039;&#039;html&#039;&#039; mode. So this give us our file name which is &amp;lt;tt&amp;gt;view.html.php&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor, &#039;&#039;&#039;create a file &amp;lt;tt&amp;gt;yoursite/components/com_helloworld/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&#039;&#039;&#039; able to display the default view and containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
The &#039;&#039;display&#039;&#039; method of the &#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; class is called with the &#039;&#039;display&#039;&#039; task of the JControllerLegacy class. In our case, this method will display data using the &#039;&#039;tmpl/default.php&#039;&#039; file. With your favourite file manager and editor, create a file &#039;&#039;&#039;&amp;lt;tt&amp;gt;yoursite/components/com_helloworld/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&#039;&#039;&#039; able to display the default view and containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
So to give an example, one could call the view inside the &#039;&#039;yoursite/components/com_[component_name]/views/[name of view]/&#039;&#039; folder by calling &amp;lt;code&amp;gt;index.php?option=com_helloworld&amp;lt;/code&amp;gt; (this would default to the &amp;lt;tt&amp;gt;yoursite/components/com_helloworld/views/helloworld/&amp;lt;/tt&amp;gt; folder) or we could explicitly call the folder by calling:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;index.php?option=com_helloworld&amp;amp;view=helloworld&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
if we change &amp;lt;code&amp;gt;&amp;amp;view=helloworld&amp;lt;/code&amp;gt; to something else, e.g. &amp;lt;code&amp;gt;&amp;amp;view=fluffy&amp;lt;/code&amp;gt; we would have to create a folder &amp;lt;code&amp;gt;components/com_helloworld/views/fluffy/&amp;lt;/code&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
Copy the contents of &amp;lt;code&amp;gt;views/helloworld&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;views/fluffy&amp;lt;/code&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
The classname of the file &amp;lt;code&amp;gt;view.html.php&amp;lt;/code&amp;gt; of the fluffy folder would be &#039;&#039;HelloWorldViewFluffy&#039;&#039;. Afterwards you can customize the contents of &#039;&#039;default.php&#039;&#039; of the &#039;&#039;fluffy&#039;&#039; subfolder for custom output and see the output by calling &amp;lt;code&amp;gt;index.php?option=com_helloworld&amp;amp;view=fluffy&amp;lt;/code&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the component == &amp;lt;!--T:32--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive] and install it using the extension manager of Joomla. You can test this basic component by putting &#039;&#039;index.php?option=com_helloworld&#039;&#039; in your browser address.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.2.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;December 2013&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Result:&#039;&#039;&#039;&lt;br /&gt;
You will see by default the message contained in the variable &#039;&#039;$this-&amp;gt;msg&#039;&#039; in the &amp;lt;tt&amp;gt;view.html.php&amp;lt;/tt&amp;gt; file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kevinkabatra</name></author>
	</entry>
</feed>