<?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=4yn4a</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=4yn4a"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/4yn4a"/>
	<updated>2026-08-21T11:33:08Z</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/Developing_a_Basic_Component&amp;diff=99826</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=99826"/>
		<updated>2013-06-03T08:15:57Z</updated>

		<summary type="html">&lt;p&gt;4yn4a: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:Developing a Model-View-Controller Component/3.0}}&lt;br /&gt;
&lt;br /&gt;
= Developing a Basic Component =&lt;br /&gt;
&lt;br /&gt;
This page goes through the basic steps required to make the simplest possible component that will output &#039;&#039;Hello, world!&#039;&#039; to the [[Site (Application)|front-end]] of a Joomla! {{JVer|{{CurrentSTSVer|minor}}}} website.&lt;br /&gt;
&lt;br /&gt;
== Main Output ==&lt;br /&gt;
&lt;br /&gt;
First set up the basic public output for this component.  Create &amp;lt;code&amp;gt;yoursite/components/com_helloworld/helloworld.php&amp;lt;/code&amp;gt; with the following contents:&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;
echo &#039;Hello world&#039;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manifest file ==&lt;br /&gt;
&lt;br /&gt;
Every extension needs a [[manifest files|manifest file]] that specifies installation and configuration information for the extension.  The manifest file is named &amp;lt;code&amp;gt;&#039;&#039;componentname&#039;&#039;.xml&amp;lt;/code&amp;gt;.  For a simple component we need only include a minimal number of the possible elements in this XML file.&lt;br /&gt;
&lt;br /&gt;
Create &amp;lt;code&amp;gt;helloworld.xml&amp;lt;/code&amp;gt; in the same directory as your &amp;lt;code&amp;gt;helloworld.php&amp;lt;/code&amp;gt; above, with the following contents:&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.1&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;administration &amp;gt; &amp;lt;/administration&amp;gt;&lt;br /&gt;
        &amp;lt;files&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;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; element is actually optional, but it makes for easier identification in the next step.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Next, we need to tell Joomla! to &#039;discover&#039; this new component, so that it can be installed and used.  This is done by going to the &#039;&#039;Extension Manager -&amp;gt; Discover&#039;&#039; and clicking &#039;Discover&#039; in the toolbar.  This will scan the &amp;lt;code&amp;gt;components&amp;lt;/code&amp;gt; directory (amongst others), looking for components that have not yet been installed.&lt;br /&gt;
&lt;br /&gt;
The new component should be listed in the resulting table, and to install it you just select it (with the checkbox) and click &#039;Install&#039; in the toolbar.&lt;br /&gt;
&lt;br /&gt;
Note: Don&#039;t worry about the message &#039;&#039;&amp;quot;Component Install: The XML file did not contain an administration element&amp;quot;&#039;&#039;, as our component does not yet have any [[Administrator (Application)|administration]] features.  We&#039;ll add these later in the tutorial.&lt;br /&gt;
&lt;br /&gt;
== Hello, world! ==&lt;br /&gt;
&lt;br /&gt;
You can now see the basic component in action, by navigating to &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://localhost/joomla/index.php?option=com_helloworld&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (replacing &amp;lt;code&amp;gt;localhost/joomla&amp;lt;/code&amp;gt; with your own installation location).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Component Development]] [[Category:Joomla! 3.0]] [[Category:Joomla! 3.1]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>4yn4a</name></author>
	</entry>
</feed>