<?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=JimDeLaHunt</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=JimDeLaHunt"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/JimDeLaHunt"/>
	<updated>2026-08-26T08:14:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J2.5:Supporting_SEF_URLs_in_your_component&amp;diff=15755</id>
		<title>J2.5:Supporting SEF URLs in your component</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J2.5:Supporting_SEF_URLs_in_your_component&amp;diff=15755"/>
		<updated>2009-09-22T22:18:17Z</updated>

		<summary type="html">&lt;p&gt;JimDeLaHunt: /* A Simple Example */ Clarify that component name prefix is all lower-case&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
{{RightTOC}}&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
&lt;br /&gt;
== Routing Overview ==&lt;br /&gt;
&lt;br /&gt;
Joomla! 1.5 is capable of creating and parsing URLs in any format, including human readable URL&#039;s. Another improvement is that this still works even if Joomla! runs a server other than Apache with the mod_rewrite module.&lt;br /&gt;
&lt;br /&gt;
A good example of this is the &amp;quot;Welcome to Joomla&amp;quot; article. The first link shown was generated without mod_rewrite, and the second link was generated with mod_rewrite:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://www.example.com/index.php/the-­news/1-­latest­-news/1­-welcome­-to­-joomla&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://www.example.com/the-­news/1­-latest-­news/1-­welcome-­to­-joomla&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preparing Your Data for Routing ==&lt;br /&gt;
&lt;br /&gt;
=== The Alias ===&lt;br /&gt;
&lt;br /&gt;
The first step is the generation of the so called alias. The alias is used in the URL instead of the title (the title is the text you want to have in the url). The alias has to be URI safe, which means accented UTF­8 characters are replaced by their ASCII­7 equivalents, white spaces by hyphens, etc.&lt;br /&gt;
&lt;br /&gt;
The alias can be defined by the user, but you should ensure that the above requirements for a URL safe alias are met. A good way to do so is to use the JTable::check() method during the save process. Have a look at this example code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function check()&lt;br /&gt;
{&lt;br /&gt;
    jimport( &#039;joomla.filter.output&#039; );&lt;br /&gt;
    if(empty($this-&amp;gt;alias)) {&lt;br /&gt;
	    $this-&amp;gt;alias = $this-&amp;gt;title;&lt;br /&gt;
    }&lt;br /&gt;
    $this-&amp;gt;alias = JFilterOutput::stringURLSafe($this-&amp;gt;alias);&lt;br /&gt;
&lt;br /&gt;
    /* All your other checks */&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the alias field is empty the title will be used as alias. Then the alias will be made URLSafe using the JFilterOutput::stringURLSafe() method.&lt;br /&gt;
&lt;br /&gt;
=== The Slug ===&lt;br /&gt;
&lt;br /&gt;
Continuing with the same example, the &amp;quot;slug&amp;quot; - &amp;quot;1­-welcome­-to­-joomla&amp;quot; has two parts. The first part is the article identifier (id) and the second is the alias. They are separated by a hyphen. These two elements were combined during the database query in the model:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$query = &#039;SELECT a.*,&#039;.&lt;br /&gt;
        &#039; CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\&#039;:\&#039;, a.id, a.alias) ELSE a.id END as slug,&#039;.&lt;br /&gt;
        [...];&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this step the slug is used instead of the id.&lt;br /&gt;
&lt;br /&gt;
== Routing URL&#039;s ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;JRoute::_&amp;lt;/code&amp;gt; method translates the internal Joomla! URL to a custom URL. &amp;lt;code&amp;gt;JRoute&amp;lt;/code&amp;gt; has three parameters and its prototype is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;JRoute::_( $url, $xhtml = true, $ssl=0 );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;$url&amp;lt;/code&amp;gt; is a string containing the absolute or relative internal Joomla! URL.&lt;br /&gt;
* &amp;lt;code&amp;gt;$xhtml&amp;lt;/code&amp;gt; is a boolean value that specifies whether or not the output should be in XHTML. This parameter is optional and if omitted defaults to true.&lt;br /&gt;
* &amp;lt;code&amp;gt;$ssl&amp;lt;/code&amp;gt; is an integer value that specifies whether the URI should be secure. It should be set to 1 to force the URI to be secure using the global secure site URI, 0 to leave it in the same state as when it was passed, and -1 to force the URI to be unsecure using the global unsecure site URI.&lt;br /&gt;
&lt;br /&gt;
The most important parameter is &amp;lt;code&amp;gt;$url&amp;lt;/code&amp;gt;. A call to this method might look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;JRoute::_( &#039;index.php?view=article&amp;amp;id=&#039;.$row-&amp;gt;slug );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$row-­&amp;gt;slug&amp;lt;/code&amp;gt; is the value that was generated in step 2 from a combination of id and title alias.&lt;br /&gt;
&lt;br /&gt;
Another advantage of using JRoute is that the router now handles $option (the component name) and the $Itemid (the menu item ID). The component itself doesn’t have to know its name ($option) or the active menu item ($Itemid) like it did in previous version of Joomla!.&lt;br /&gt;
&lt;br /&gt;
It is important that you think about the sequence of the URL parameter in this stage. This will be more clear when we have a deeper look at the router.php in the next section.&lt;br /&gt;
&lt;br /&gt;
The building process of JRouter is divided into two steps:&lt;br /&gt;
&lt;br /&gt;
* Create the application route. The application route is fully handled by JRouter and the component developer doesn’t have to do anything to make it work.&lt;br /&gt;
* Create the component route. To create the component route, JRouter looks for the router.php in the component directory which is responsible for building the route for the component.&lt;br /&gt;
&lt;br /&gt;
== The Component Router ==&lt;br /&gt;
&lt;br /&gt;
We will have two functions In the router.php. One is responsible for building the URL and the other is responsible for parsing it. In the next examples, a very basic and a more advanced one, we assume that we have three views that links can point to. The first is a categories overview (view=categories), the second is a single category (view=category) and the third is a single article (view=article).&lt;br /&gt;
&lt;br /&gt;
The file router.php should be in the site area of your component. It is not used on admin/backend pages. Don&#039;t forget to add it to your installation XML in the site folder.&lt;br /&gt;
&lt;br /&gt;
=== A Simple Example ===&lt;br /&gt;
&lt;br /&gt;
This simple example will illustrate the basics of implementing a router for your component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
function [componentname]BuildRoute( &amp;amp;$query )&lt;br /&gt;
{&lt;br /&gt;
       $segments = array();&lt;br /&gt;
       if(isset($query[&#039;view&#039;]))&lt;br /&gt;
       {&lt;br /&gt;
                $segments[] = $query[&#039;view&#039;];&lt;br /&gt;
                unset( $query[&#039;view&#039;] );&lt;br /&gt;
       }&lt;br /&gt;
       if(isset($query[&#039;id&#039;]))&lt;br /&gt;
       {&lt;br /&gt;
                $segments[] = $query[&#039;id&#039;];&lt;br /&gt;
                unset( $query[&#039;id&#039;] );&lt;br /&gt;
       };&lt;br /&gt;
       return $segments;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;JRouter&amp;lt;/code&amp;gt; passes a $query array to the &amp;lt;code&amp;gt;[&#039;&#039;componentname&#039;&#039;]BuildRoute&amp;lt;/code&amp;gt; function. This function will add the relevant parts of the array to the $segments array in the right order and will return the properly ordered array. The content of the &amp;lt;code&amp;gt;$query&amp;lt;/code&amp;gt; array needs to be unset, otherwise &amp;lt;code&amp;gt;JRouter&amp;lt;/code&amp;gt; will add it to the URL in the form of a query string (i.e. any variables that are not handled by the router will be passed in the query string).&lt;br /&gt;
&lt;br /&gt;
The prefix &#039;&#039;componentname&#039;&#039; is the name for your component, as found in the directory holding the component&#039;s files. For instance, a component &amp;quot;Magic&amp;quot; in directory &amp;lt;code&amp;gt;/components/com_magic/...&amp;lt;/code&amp;gt; would use a prefix &amp;lt;code&amp;gt;magic&amp;lt;/code&amp;gt; (all lower case).&lt;br /&gt;
&lt;br /&gt;
The next function in the &amp;lt;code&amp;gt;router.php&amp;lt;/code&amp;gt; parses the URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
function [componentname]ParseRoute( $segments )&lt;br /&gt;
{&lt;br /&gt;
       $vars = array();&lt;br /&gt;
       switch($segments[0])&lt;br /&gt;
       {&lt;br /&gt;
               case &#039;categories&#039;:&lt;br /&gt;
                       $vars[&#039;view&#039;] = &#039;categories&#039;;&lt;br /&gt;
                       break;&lt;br /&gt;
               case &#039;category&#039;:&lt;br /&gt;
                       $vars[&#039;view&#039;] = &#039;category&#039;;&lt;br /&gt;
                       $id = explode( &#039;:&#039;, $segments[1] );&lt;br /&gt;
                       $vars[&#039;id&#039;] = (int) $id[0];&lt;br /&gt;
                       break;&lt;br /&gt;
               case &#039;article&#039;:&lt;br /&gt;
                       $vars[&#039;view&#039;] = &#039;article&#039;;&lt;br /&gt;
                       $id = explode( &#039;:&#039;, $segments[1] );&lt;br /&gt;
                       $vars[&#039;id&#039;] = (int) $id[0];&lt;br /&gt;
                       break;&lt;br /&gt;
       }&lt;br /&gt;
       return $vars;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What happens here? In the function &amp;lt;code&amp;gt;[&#039;&#039;componentname&#039;&#039;]BuildRoute&amp;lt;/code&amp;gt; we arranged the items in the &amp;lt;code&amp;gt;$query&amp;lt;/code&amp;gt; array in a specific sequence. This means that in this example the view is first, the catid is second and the id is third in the array.&lt;br /&gt;
&lt;br /&gt;
By reading &amp;lt;code&amp;gt;$segments[0]&amp;lt;/code&amp;gt;, we access the name of the view. We set the right view and/or identifier depending on its value and we return the &amp;lt;code&amp;gt;$vars&amp;lt;/code&amp;gt; array to &amp;lt;code&amp;gt;JRouter&amp;lt;/code&amp;gt;. $vars should be an associative array similar to the array that was passed to the BuildRoute method.&lt;br /&gt;
&lt;br /&gt;
The above example of the &amp;lt;code&amp;gt;router.php&amp;lt;/code&amp;gt; is a very simple way to generate sef URL&#039;s but should show how this works quite clearly.&lt;br /&gt;
&lt;br /&gt;
The generated URL in this example contains the name of the view and doesn&#039;t reflect the content hierarchy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://www.example.com/[menualias]/[view]/[slug]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== A More Advanced Example ===&lt;br /&gt;
&lt;br /&gt;
In the next example we will try to get rid of the need for the view and we will try to reflect the current hierarchy level in the URL.&lt;br /&gt;
&lt;br /&gt;
The goal is URL&#039;s that look like:&lt;br /&gt;
&lt;br /&gt;
* When viewing an article: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://www.example.com/[menualias]/[category]/[article]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* When viewing a category: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://www.example.com/[menualias]/[category]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* When viewing the categories overview: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://www.example.com/[menualias]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s assume we have done step 1 and 2 also for the category.&lt;br /&gt;
&lt;br /&gt;
The link to the article would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JRoute::_( &#039;index.php?view=article&amp;amp;catid=&#039;.$row-­&amp;gt;catslug .&#039;&amp;amp;id=&#039;.$row-­&amp;gt;slug );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the Link to the category would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JRoute::_( &#039;index.php?view=category&amp;amp;id=&#039;.$row-&amp;gt;catslug );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The corresponding &amp;lt;code&amp;gt;router.php&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function [&#039;&#039;Componentname&#039;&#039;]BuildRoute(&amp;amp;$query)&lt;br /&gt;
{&lt;br /&gt;
       $segments = array();&lt;br /&gt;
       if(isset( $query[&#039;catid&#039;] ))&lt;br /&gt;
       {&lt;br /&gt;
                $segments[] = $query[&#039;catid&#039;];&lt;br /&gt;
                unset( $query[&#039;catid&#039;] );&lt;br /&gt;
       };&lt;br /&gt;
       if( isset($query[&#039;id&#039;]) )&lt;br /&gt;
       {&lt;br /&gt;
                $segments[] = $query[&#039;id&#039;];&lt;br /&gt;
                unset( $query[&#039;id&#039;] );&lt;br /&gt;
       };&lt;br /&gt;
       unset( $query[&#039;view&#039;] );&lt;br /&gt;
       return $segments;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The difference now is that we don’t add the name of the view to the &amp;lt;code&amp;gt;$segments&amp;lt;/code&amp;gt; array. We still unset the view key since otherwise, &amp;lt;code&amp;gt;JRouter&amp;lt;/code&amp;gt; would add it to the URL as part of the query string. Another new thing here is the additional parameter catid that we push into the &amp;lt;code&amp;gt;$segments&amp;lt;/code&amp;gt; array.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
function [&#039;&#039;Componentname&#039;&#039;]ParseRoute($segments)&lt;br /&gt;
{&lt;br /&gt;
       $vars = array();&lt;br /&gt;
       $menu =&amp;amp; JMenu::getInstance();&lt;br /&gt;
       $item =&amp;amp; $menu-&amp;gt;getActive();&lt;br /&gt;
       // Count segments&lt;br /&gt;
       $count = count( $segments );&lt;br /&gt;
       //Handle View and Identifier&lt;br /&gt;
       switch( $item-­&amp;gt;query[&#039;view&#039;] )&lt;br /&gt;
       {&lt;br /&gt;
               case &#039;categories&#039;:&lt;br /&gt;
                       if($count == 1) {&lt;br /&gt;
                               $vars[&#039;view&#039;] = &#039;category&#039;;&lt;br /&gt;
                       }&lt;br /&gt;
                       if($count == 2) {&lt;br /&gt;
                               $vars[&#039;view&#039;] = &#039;article&#039;;&lt;br /&gt;
                       }&lt;br /&gt;
                       $id = explode( &#039;:&#039;, $segments[$count-1] );&lt;br /&gt;
                       $vars[&#039;id&#039;] = (int) $id[0];&lt;br /&gt;
                       break;&lt;br /&gt;
               case &#039;category&#039;:&lt;br /&gt;
                       $id   = explode( &#039;:&#039;, $segments[$count-1] );&lt;br /&gt;
                       $vars[&#039;id&#039;]   = (int) $id[0];&lt;br /&gt;
                       $vars[&#039;view&#039;] = &#039;article&#039;;&lt;br /&gt;
                       break;&lt;br /&gt;
       }&lt;br /&gt;
       return $vars;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that this ParseRoute function has a lot of different code parts in comparison to the previous. The reason for this is simple. We don’t have the name of the view in the &amp;lt;code&amp;gt;$segments&amp;lt;/code&amp;gt; array and we need to find another way to determine it.&lt;br /&gt;
&lt;br /&gt;
We need to find out which level of hierarchy we are in by receiving the root element. We do this by looking to the view name of the active menu item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$item-­&amp;gt;query[&#039;view&#039;]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also we need to know the number of items in the &amp;lt;code&amp;gt;$segments&amp;lt;/code&amp;gt; array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$count = count( $segments );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this information we can correctly set the view for all possible three cases:&lt;br /&gt;
&lt;br /&gt;
* The menu item is a link to the categories view and the &amp;lt;code&amp;gt;$segments&amp;lt;/code&amp;gt; array has two items (&amp;lt;code&amp;gt;$catid&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$id&amp;lt;/code&amp;gt;). In this case we know that we need to parse a link to an article .&lt;br /&gt;
* The menu item is a link to the categories view and the $segments array has one item ($id). In this case we know that we need to parse a link to a category.&lt;br /&gt;
* The menu item is a link to a category. In this case, we know that any item in the $segments array is the identifier for an article .&lt;br /&gt;
&lt;br /&gt;
The result of all this code is nice and human readable component URL&#039;s.&lt;br /&gt;
&lt;br /&gt;
== Application Route Parsing ==&lt;br /&gt;
&lt;br /&gt;
The [[API Execution Order]] outlines that the route (URL) is parsed immediately after initialisation is complete.  Since fancy URL&#039;s are not treated (yet) in the Administrator, we will follow the route parsing process in detail when &amp;lt;code&amp;gt;JSite::route&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;index.php&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
* Call to &amp;lt;code&amp;gt;JApplication::route&amp;lt;/code&amp;gt;&lt;br /&gt;
** Clone the URI&lt;br /&gt;
** Call to &amp;lt;code&amp;gt;JApplication::getRouter&amp;lt;/code&amp;gt;&lt;br /&gt;
*** Call to &amp;lt;code&amp;gt;JRouter::getInstance&amp;lt;/code&amp;gt; passing the type (&amp;quot;site&amp;quot;)&lt;br /&gt;
** Call to &amp;lt;code&amp;gt;JRouterSite::parse&amp;lt;/code&amp;gt; passing the URI&lt;br /&gt;
*** Strip the suffix if applicable (added to $vars[&#039;format&#039;])&lt;br /&gt;
*** Re-set the route (URI)&lt;br /&gt;
*** Call to &amp;lt;code&amp;gt;JRouter::parse&amp;lt;/code&amp;gt; passing the URI&lt;br /&gt;
**** Call to &amp;lt;code&amp;gt;JRouterSite::_processParseRules&amp;lt;/code&amp;gt; passing the URI (this will call custom route rules)&lt;br /&gt;
***** Call to &amp;lt;code&amp;gt;JRouter::_processParseRules&amp;lt;/code&amp;gt; passing the URI&lt;br /&gt;
****** Call any custom routing rules (probably added via a system plugin using the &amp;lt;code&amp;gt;onAfterInitialise&amp;lt;/code&amp;gt; event trigger) passing the URI&lt;br /&gt;
****** Returns an array of vars&lt;br /&gt;
***** If SEF mode, replace &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; variable with &amp;lt;/code&amp;gt;limitstart&amp;lt;/code&amp;gt;&lt;br /&gt;
**** If raw mode, call to &amp;lt;code&amp;gt;JRouterSite::_parseRawRoute&amp;lt;/code&amp;gt; passing the URI&lt;br /&gt;
**** If SEF mode, call to &amp;lt;code&amp;gt;JRouterSite::_parseSefRoute&amp;lt;/code&amp;gt; passing the URI&lt;br /&gt;
***** If the route (the URI path) is empty, load it from the default menu item; set the active menu item as the default&lt;br /&gt;
***** If first part is &amp;lt;code&amp;gt;/component/com_content&amp;lt;/code&amp;gt;, set the &amp;lt;code&amp;gt;option&amp;lt;/code&amp;gt; as the second segement.  Null the &amp;lt;code&amp;gt;Itemid&amp;lt;/code&amp;gt;.&lt;br /&gt;
***** Else, loop through menu alias values and take off segments that match as the menu tree is traversed.  Set &amp;lt;code&amp;gt;option&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Itemid&amp;lt;/code&amp;gt; based on the last menu item found.&lt;br /&gt;
***** If the &amp;lt;code&amp;gt;Itemid&amp;lt;/code&amp;gt; is set in the URL, set the active menu item based on this value.&lt;br /&gt;
***** Push the vars collected so far (eg, &amp;lt;code&amp;gt;option&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Itemid&amp;lt;/code&amp;gt;, etc) into the router object (&amp;lt;code&amp;gt;$this&amp;lt;/code&amp;gt;).&lt;br /&gt;
***** If the route and &amp;lt;code&amp;gt;option&amp;lt;/code&amp;gt; is set, load the component router;&lt;br /&gt;
***** Else, get the active menu item and get the route vars from it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Application Route Building ==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Custom Router Rules ==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Additional References ==&lt;br /&gt;
&lt;br /&gt;
There is a useful thread on this subject here: [[jtopic:148632]] (note, may be out of date)&lt;/div&gt;</summary>
		<author><name>JimDeLaHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=15724</id>
		<title>J1.5:Component parameters</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=15724"/>
		<updated>2009-09-19T12:23:54Z</updated>

		<summary type="html">&lt;p&gt;JimDeLaHunt: /* 1. Component-wide default parameters */ More on url elements&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
One thing that sets Joomla! Components apart from other types of Extension (i.e. Modules and Plugins) is the ability to store significant quantities of data in the Joomla! MySQL database.  Typically, this data will be content for displaying on a page (such as the content of an article, or its title) or data about how that content should be displayed (e.g. a setting specifying whether or not the title should be shown).  A Component normally creates at least one table in the database to store this data - for example, data for articles associated with the &amp;lt;code&amp;gt;com_content&amp;lt;/code&amp;gt; Component are stored in the &amp;lt;code&amp;gt;jos_content&amp;lt;/code&amp;gt; table (where &#039;&#039;jos&#039;&#039; is the table prefix for the site).&lt;br /&gt;
&lt;br /&gt;
However, choosing exactly how to store each item of data requires a little more thought.  There are essentially two choices:  each data item may be stored in its own field, or a collection of data items may be stored within a single parameters field.  (Of course, there is nothing to stop you making use of both methods, for different data items, within the same component).  Which approach you use for a given data item is largely a matter of personal choice, although there are some factors to consider:&lt;br /&gt;
* Core code included in the Joomla! installation makes it very easy to produce the appropriate form elements for entering data into &#039;&#039;&#039;parameters&#039;&#039;&#039; in the Back-end.  If you choose to save the data in separate fields, you will need to code the appropriate form elements yourself.&lt;br /&gt;
* Again, Joomla! core code allows you to set default values for &#039;&#039;&#039;parameters&#039;&#039;&#039; across the whole component.  Individual component items (e.g. individual articles) can then choose to use the default values, or to override them with values specific to that item.  See below for details of how to do this.&lt;br /&gt;
* It is not possible to extract individual parameter values directly from the database.  Instead, the whole parameters field must be extracted and parsed to obtain the different parameter values.  This means that it is not very easy, for example, to run MySQL queries that search for a parameter with a particular value.  Any data that you want to run queries against should be given its &#039;&#039;&#039;own table field&#039;&#039;&#039;.&lt;br /&gt;
* Similarly, it is not possible to run data validation on parameter fields before saving data.&lt;br /&gt;
In general, parameters are conventionally used to store data relating to the &#039;&#039;presentation&#039;&#039; of information.  The information itself is generally stored in separate fields.&lt;br /&gt;
&lt;br /&gt;
==Types of Component parameter==&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These parameters are set once for the whole Component, and are generally used to provide the &#039;default&#039; parameter settings for the Component on that particular site.  &lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
A menu link to an individual Component item (e.g. an article) can also have parameters associated with it, which can affect the way the Component item is displayed &#039;&#039;using that link&#039;&#039;.  The types of parameters available will depend on the way that the Component item is displayed (the &#039;view&#039; in MVC terms, but don&#039;t worry if this doesn&#039;t mean anything to you!).  However, the precise values of those parameters can be set for each menu link individually.  If there is another menu link to that same Component item, then it is important to realise each menu link may have different parameter values, and so the same article may be displayed differently in the two cases.&lt;br /&gt;
&lt;br /&gt;
A menu link can also override the Component-wide default parameters, so that the override values (if set) are used in place of the default values &#039;&#039;for that Component item when accessed via that menu link&#039;&#039;.  As you would expect, when no override value is set, the default value is used instead, in the normal manner.&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
Finally, each Component item (e.g. article) can have parameters which apply to that item, regardless of how it is accessed (i.e. via any available menu link, or even without reference to a menu at all!).  If the Component designer wants, the article specific parameters can also be set up to use the &#039;override&#039; behaviour, so that they default to the current values of the corresponding Component-wide parameters, though this is not essential.  Again, this is described further below.&lt;br /&gt;
&lt;br /&gt;
==Storing the parameters and their values.==&lt;br /&gt;
&lt;br /&gt;
In general, a set of parameters is stored within the database in a single &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; field.  Different parameters are separated by &amp;lt;code&amp;gt;newline&amp;lt;/code&amp;gt; characters (&#039;&amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;&#039; in MySQL - each parameter will appear on a different line when you look at the data in something like phpMyAdmin).  Each parameter consists of the parameter name and value, separated by an equals sign (=).  As an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
parameter1=parameter1value&lt;br /&gt;
parameter2=&lt;br /&gt;
parameter3=parameter3value&lt;br /&gt;
parameter4=parameter4value&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, parameter1, parameter3, and parameter4 have all been assigned values, whilst parameter2 has no value.  Typically, a parameter will be given no value where it is set up to allow override of a default value, but &#039;no override is required&#039; - i.e. it is desired to use the default value.&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the jos_components table, in the row corresponding to the particular component to which they apply.&lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the jos_menu table, in the row corresponding to the particular menu item to which they apply.&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in a text field in the table created by the Component.  Whilst there is no strict rule for naming the field, it is common to extend the above pattern using the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; name.  However, com_content stores article parameters in a field called &amp;lt;code&amp;gt;attribs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Accessing the parameters - Back-end==&lt;br /&gt;
&lt;br /&gt;
Joomla! includes some shortcuts to enable component creators to easily add parameter forms to the Back-end of their component.  These forms allow a site administrator to enter a parameter value by, for example, entering some text in a box, choosing from a drop-down list, or selecting a radio button.  To create these forms, each parameter needs to have an associated &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; object in an XML file.  The type of &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; object determines the form elements that will be shown in the Back-end.  A list of the available form elements is given [[Standard_parameter_types|here]].  More information is given below about the XML file names, structure and location required for each set of parameters.&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These can be created at installation of the Component, by including &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; elements in the installation XML file (typically called COMPONENT_NAME.xml, and located in the root folder of the Component package.  As far as the parameters are concerned, this XML file has the following structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;install&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;!-- Example: the following will create a line in the parameters field &lt;br /&gt;
    reading &#039;font_size=16\n&#039;: --&amp;gt;&lt;br /&gt;
    &amp;lt;param name=&amp;quot;font_size&amp;quot; default=&amp;quot;16&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  &amp;lt;url addpath=&amp;quot;....&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
  &amp;lt;/url&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/install&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Each &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; element must be given the attributes &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt;, which define the parameter name and value respectively.  These values are then copied to the jos_components table in the database.&lt;br /&gt;
&lt;br /&gt;
However, on its own this is not very useful, as it doesn&#039;t allow users to change the values of the parameters.  To do this, parameter form elements need to be defined in a file named &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; which is located in &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/&amp;lt;/code&amp;gt;.  The file should have the following structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;url addpath=&amp;quot;/administrator/components/com_COMPONENT_NAME/elements&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;param name=&amp;quot;cid&amp;quot; type=&amp;quot;JELEMENT_TYPE_NAME&amp;quot; scope=&amp;quot;com_COMPONENT_NAME&amp;quot; default=&amp;quot;0&amp;quot; label=&amp;quot;LABEL&amp;quot; description=&amp;quot;DESCRIPTION&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;param type=&amp;quot;type&amp;quot; name=&amp;quot;name&amp;quot; description=&amp;quot;description&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;!-- Example: the following will produce a text box 3 characters wide with the label &#039;Font size:&#039;.  &lt;br /&gt;
    When the user hovers the mouse over the label, a tooltip will pop up which states &#039;Please enter the &lt;br /&gt;
    required font size&#039;.  On saving, a value entered into the text box will be saved as the &#039;font_size&#039; &lt;br /&gt;
    parameter value. --&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;param type=&amp;quot;text&amp;quot; name=&amp;quot;font_size&amp;quot; size=&amp;quot;3&amp;quot; label=&amp;quot;Font size:&amp;quot; description=&amp;quot;Please enter the required font size&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/code&amp;gt; element can have any name you wish, but there must be one element at the root of the document (this is a requirement for a well-formed XML document). You can have more than one &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; element, but only the first one will be considered.  It is not currently possible to group certain parameter form elements together.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;url&amp;gt;&amp;lt;/code&amp;gt; section contains parameters which are added to the URL of the menu item. To enable this functionality, the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; attribute of the &amp;lt;code&amp;gt;&amp;lt;param&amp;gt;&amp;lt;/code&amp;gt; elements must specify the name of a class which extends JElement, and is able to generate HTML forms to display and set the parameter. You can use one of the [[Standard parameter types]]. Or, you can create your own subclass of JElement. Put the class definition file in your component&#039;s &amp;lt;code&amp;gt;/administrator/components/com_COMPONENT_NAME/&amp;lt;/code&amp;gt; directory, and refer to this path in the &amp;lt;code&amp;gt;addpath&amp;lt;/code&amp;gt; attribute of the &amp;lt;code&amp;gt;&amp;lt;URL&amp;gt;&amp;lt;/code&amp;gt; element. More information here: http://forum.joomla.org/viewtopic.php?f=476&amp;amp;t=206062.&lt;br /&gt;
&lt;br /&gt;
So that administrators to access these parameters, you will need to add a button to the toolbar in the Back-end of your component.  This can be done using the code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JToolBarHelper::preferences( &#039;com_COMPONENT_NAME&#039; );&lt;br /&gt;
// e.g. for the core Content component, you would use JToolBarHelper::preferences( &#039;com_content&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which is typically placed in the PHP file responsible for the Back-end output.  (For example, using an MVC structure, you might place this code at the top of &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This adds a &amp;lt;code&amp;gt;Parameters&amp;lt;/code&amp;gt; button to the toolbar:&lt;br /&gt;
&lt;br /&gt;
[[Image:Toolbar_newsfeed.png]]&lt;br /&gt;
&lt;br /&gt;
Clicking on the toolbar button produces a pop-up window containing the form fields for each parameter defined in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that there is no need to define &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; attributes for the &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; elements in the &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file, since the default values will already have been saved in the installation of the Component.&lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
A menu item is associated with a particular view from your Component&#039;s Front-end - following the menu link in the Front-end will display that view.  Joomla! 1.5 allows you to define parameters for a particular view, so that a copy of those parameters can be associated with each menu item using the view.  In addition, you can also choose to override the Component-wide default parameters defined as above, so that the override values will apply to the particular menu item.&lt;br /&gt;
&lt;br /&gt;
The view parameters are defined in an XML file stored in the &#039;&#039;Front-end&#039;&#039; view output template directory.  (This is not to be confused with the site Template directory, which is different!). The XML file has the same name as the layout used with the template. For must applications you will be using the default layout. Thus the path the XML file is something like: &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/components/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.xml&amp;lt;/code&amp;gt;.  The structure of the file is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;state&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;params&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/params&amp;gt;&lt;br /&gt;
    &amp;lt;url&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;advanced&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/advanced&amp;gt;&lt;br /&gt;
  &amp;lt;/state&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Standard parameter types]] for a full list of the core parameter types. (You can use these types within a &amp;lt;code&amp;gt;&amp;lt;url&amp;gt;&amp;lt;/code&amp;gt; section without needing to supply an &amp;lt;code&amp;gt;addpath&amp;lt;/code&amp;gt; attribute.)&lt;br /&gt;
&lt;br /&gt;
Displaying the forms for these parameters is handled automatically by the core &amp;lt;code&amp;gt;com_menus&amp;lt;/code&amp;gt; component, which creates a number of slider panes on the right hand side (at least when viewed using the default Khepri backend site Template) of the menu item edit screen.  Any parameters defined within the &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;url&amp;gt;&amp;lt;/code&amp;gt; tags will appear in the &amp;lt;code&amp;gt;Parameters - Basic&amp;lt;/code&amp;gt; slider pane.  Any parameters defined within the &amp;lt;code&amp;gt;&amp;lt;advanced&amp;gt;&amp;lt;/code&amp;gt; tag will appear in the &amp;lt;code&amp;gt;Parameters - Advanced&amp;lt;/code&amp;gt; slider pane.&lt;br /&gt;
&lt;br /&gt;
The following screenshot shows the menu admin page for the Category &#039;List&#039; layout.  You can see that the &amp;lt;code&amp;gt;Parameters - Basic&amp;lt;/code&amp;gt; slider pane is open, and contains form elements for five parameters.  There are no &#039;Advanced&#039; parameters for this view, and so the &amp;lt;code&amp;gt;Parameters - Advanced&amp;lt;/code&amp;gt; slider pane is not shown:&lt;br /&gt;
&lt;br /&gt;
[[Image:Menu items edit.png]]&lt;br /&gt;
&lt;br /&gt;
For the override of the Component-wide default parameters, &amp;lt;code&amp;gt;com_menus&amp;lt;/code&amp;gt; uses the same &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file as above, so there is no need to define these parameters again.  The override forms are automatically added to a slider pane named &amp;lt;code&amp;gt;Parameters - Component&amp;lt;/code&amp;gt;.  However, there are a number of changes from the forms used in the Preferences pop-up window (despite being based on the same &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file):&lt;br /&gt;
* Any &amp;lt;code&amp;gt;&amp;lt;param type=&amp;quot;radio&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; parameter is shown not as a radio button form field, but by a drop-down list.&lt;br /&gt;
* All drop-down lists (both those defined as such in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt;, and those defined as radio buttons) are given an extra  option.  This extra option displays the text &amp;quot;Use Global&amp;quot; but has an associated value of an empty string.  The &amp;quot;Use Global&amp;quot; option is set as the default option for the list.  Thus, by default, these parameters will use the Component-wide default values, rather than overriding them.  (However, note that any text box fields defined with a default value in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; retain that default value, and so will override the component-wide default value if that is different).&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are defined in an XML file which can be stored anywhere you like, but is typically placed within the &amp;lt;code&amp;gt;models&amp;lt;/code&amp;gt; folder of the Component Back-end (if you are using an MVC structure) and named according to the model to which they apply, i.e. &amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/models/MODEL_NAME.xml&amp;lt;/code&amp;gt;.  The XML file has the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  &amp;lt;params group=&amp;quot;GROUP_NAME&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, you can give the &amp;lt;code&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/code&amp;gt; element whatever name you wish.  You can also have as many &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; groups as you like, though each group must have a &amp;lt;code&amp;gt;group&amp;lt;/code&amp;gt; attribute with a different &amp;lt;code&amp;gt;GROUP_NAME&amp;lt;/code&amp;gt;.  If there are two or more &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; groups with the same &amp;lt;code&amp;gt;GROUP_NAME&amp;lt;/code&amp;gt;, only the last one in the list will be considered.&lt;br /&gt;
&lt;br /&gt;
To display the forms for these parameters in the Back-end of your Component, you will need to do a little work yourself.  Firstly, you need to access the saved parameter data from the database.  For this, you will need to identify both the location of the stored parameters data in the database, and the XML file that you are using to define the parameter form fields.  Assuming that you have already created a &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt; variable to hold your component item (i.e. &#039;article&#039;) data, that the parameters data is stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt;, and that the XML file is located in the models folder as specified above, you could use the following code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$paramsdata = $row-&amp;gt;params;&lt;br /&gt;
$paramsdefs = JPATH_COMPONENT.DS.&#039;models&#039;.DS.&#039;MODEL_NAME.xml&#039;;&lt;br /&gt;
$params = new JParameter( $paramsdata, $paramsdefs );&lt;br /&gt;
&lt;br /&gt;
$this-&amp;gt;assignRef(&#039;params&#039;, $params);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This code is typically placed in the View file (e.g. view.html.php) within the corresponding folder.&lt;br /&gt;
&lt;br /&gt;
To display the parameters forms in slider panes (in the same way that they are displayed in the menu item Back-end), you should use the following code in the template file (e.g. &amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.php&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$pane =&amp;amp; JPane::getInstance( &#039;sliders&#039; );&lt;br /&gt;
&lt;br /&gt;
echo $pane-&amp;gt;startPane( &#039;content-pane&#039; );&lt;br /&gt;
&lt;br /&gt;
// First slider panel&lt;br /&gt;
// Create a slider panel with a title of SLIDER_PANEL_1_TITLE and a title id attribute of SLIDER_PANEL_1_NAME&lt;br /&gt;
echo $pane-&amp;gt;startPanel( JText::_( &#039;SLIDER_PANEL_1_TITLE&#039; ), &#039;SLIDER_PANEL_1_NAME&#039; );&lt;br /&gt;
// Display the parameters defined in the &amp;lt;params&amp;gt; group with no &#039;group&#039; attribute&lt;br /&gt;
echo $this-&amp;gt;params-&amp;gt;render( &#039;params&#039; );&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
&lt;br /&gt;
//Second slider panel&lt;br /&gt;
// Create a slider panel with a title of SLIDER_PANEL_2_TITLE and a title id attribute of SLIDER_PANEL_2_NAME&lt;br /&gt;
echo $pane-&amp;gt;startPanel( JText::_( &#039;SLIDER_PANEL_2_TITLE&#039; ), &#039;SLIDER_PANEL_2_NAME&#039; );&lt;br /&gt;
// Display the parameters defined in the &amp;lt;params&amp;gt; group with the &#039;group&#039; attribute of &#039;GROUP_NAME&#039;&lt;br /&gt;
echo $this-&amp;gt;params-&amp;gt;render( &#039;params&#039;, &#039;GROUP_NAME&#039; );&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
&lt;br /&gt;
// Repeat for each additional slider panel required&lt;br /&gt;
&lt;br /&gt;
echo $pane-&amp;gt;endPane();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
In order to save the parameters to the database you have to overload the bind() function which can be found in &lt;br /&gt;
&amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/com_COMPONENT_NAME/tables/COMPONENT_NAME.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
{&lt;br /&gt;
	if (key_exists( &#039;params&#039;, $array ) &amp;amp;&amp;amp; is_array( $array[&#039;params&#039;] ))&lt;br /&gt;
	{&lt;br /&gt;
		$registry = new JRegistry();&lt;br /&gt;
		$registry-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
		$array[&#039;params&#039;] = $registry-&amp;gt;toString();&lt;br /&gt;
	}&lt;br /&gt;
	return parent::bind($array, $ignore);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessing the parameters - frontend==&lt;br /&gt;
&lt;br /&gt;
The Front-end situation is a bit more complex than the Back-end.  The &#039;standard&#039; way to deal with parameters in the Front-end is to set up a cascade of overrides, as described above:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Item-specific &#039;&#039;overrides&#039;&#039; Menu-specific &#039;&#039;overrides&#039;&#039; Component-default&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
If you &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want to do this, then a little extra work is required&lt;br /&gt;
&lt;br /&gt;
===With overrides===&lt;br /&gt;
&lt;br /&gt;
The following code will access the Component-wide default parameters, &#039;&#039;already overridden&#039;&#039; with those for the menu item (if applicable):&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;
  $params = &amp;amp;JComponentHelper::getParams( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
&lt;br /&gt;
  // e.g. for the com_weblinks component, you would use:&lt;br /&gt;
  // $params = &amp;amp;JComponentHelper::getParams( &#039;com_weblinks&#039; )&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an MVC structure, this code would be placed in the &amp;lt;code&amp;gt;view.html.php&amp;lt;/code&amp;gt; file for the particular view required.&lt;br /&gt;
&lt;br /&gt;
Assuming that the item parameters are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field, and that the particular item has been loaded into the &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt; object by the method, you would then add in the item parameters to the &amp;lt;code&amp;gt;$params&amp;lt;/code&amp;gt; object using:&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;
  $params-&amp;gt;merge( new JParameter( &amp;amp;$row-&amp;gt;params ) );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, in both cases (i.e. overrides by menu-specific parameters, and overrides by item-specific parameters), we aren&#039;t &#039;&#039;just&#039;&#039; doing overrides - we also add in any new parameters that weren&#039;t found in the defaults.  In other words, the &amp;lt;code&amp;gt;$params&amp;lt;/code&amp;gt; object ends up with all the parameters we need!&lt;br /&gt;
&lt;br /&gt;
To access the value of a specific parameter, we would use:&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;
  $params-&amp;gt;get( &#039;PARAMETER_NAME&#039; );&lt;br /&gt;
&lt;br /&gt;
  // e.g. to obtain the value of &#039;parameter1&#039;, we use:&lt;br /&gt;
  // $params-&amp;gt;get( &#039;parameter1&#039; );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to realise that any &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; carried out is persistent, so the following code (where for example you have an array containing the parameters sets for several items, and you want the parameters for each item to individually override the defaults) would not produce the result you might expect:&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;
  foreach ($itemparamsgroup as $itemparams)&lt;br /&gt;
  {&lt;br /&gt;
    $params = &amp;amp;JComponentHelper::getParams( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
    $params-&amp;gt;merge( $itemparams );&lt;br /&gt;
    echo $params-&amp;gt;get( &#039;PARAMETER_NAME&#039; );&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In such cases, you will need to use the non-override method, and then force the overrides manually, as described below.&lt;br /&gt;
&lt;br /&gt;
===Without overrides===&lt;br /&gt;
&lt;br /&gt;
There will be cases where you don&#039;t want to use the default override pattern. For example, you may want to ignore the menu-specific parameters, and have only the item-specific parameters overriding the defaults. This is a little more difficult to accomplish, although it can still be done.&lt;br /&gt;
&lt;br /&gt;
You can access the Component-wide default parameter values, &#039;&#039;without the menu overrides&#039;&#039;, as follows:&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;
  $component = JComponentHelper::getComponent( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
  $params = new JParameter( $component-&amp;gt;params );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to override these with the menu parameters, but &#039;&#039;without&#039;&#039; the &#039;persistence&#039; effect described above, you can:&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;
  $menuitemid = JRequest::getInt( &#039;Itemid&#039; );&lt;br /&gt;
  if ($menuitemid)&lt;br /&gt;
  {&lt;br /&gt;
    $menu = JSite::getMenu();&lt;br /&gt;
    $menuparams = $menu-&amp;gt;getParams( $menuitemid );&lt;br /&gt;
    $params-&amp;gt;merge( $menuparams );&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the item parameters as before, and choose whether to merge them in using the code above, or simply store them in a separate object:&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;
  $itemparams = new JParameter( $row-&amp;gt;params );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can combine this code to achieve the effect that you want.  For example, you could override the Component-wide defaults with the item-specific parameters, but ignore those for the menu.  Or you could use the menu-specific parameters in some circumstances, and the item-specific ones in others.  [Whenever you depart from the standard approach, though, you should be careful that you inform your users how your Component works.  Users will expect your component to work the same way as those from the Joomla! core, so you should have a good reason for departing from this approach.]&lt;br /&gt;
&lt;br /&gt;
Accessing the value of a particular parameter is done in the same way as described above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Development]][[Category:Components]][[Category:Parameters]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JimDeLaHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=15723</id>
		<title>J1.5:Component parameters</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=15723"/>
		<updated>2009-09-19T12:15:03Z</updated>

		<summary type="html">&lt;p&gt;JimDeLaHunt: /* 2. Menu item specific parameters */ Clarify addpath attribute rules.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
One thing that sets Joomla! Components apart from other types of Extension (i.e. Modules and Plugins) is the ability to store significant quantities of data in the Joomla! MySQL database.  Typically, this data will be content for displaying on a page (such as the content of an article, or its title) or data about how that content should be displayed (e.g. a setting specifying whether or not the title should be shown).  A Component normally creates at least one table in the database to store this data - for example, data for articles associated with the &amp;lt;code&amp;gt;com_content&amp;lt;/code&amp;gt; Component are stored in the &amp;lt;code&amp;gt;jos_content&amp;lt;/code&amp;gt; table (where &#039;&#039;jos&#039;&#039; is the table prefix for the site).&lt;br /&gt;
&lt;br /&gt;
However, choosing exactly how to store each item of data requires a little more thought.  There are essentially two choices:  each data item may be stored in its own field, or a collection of data items may be stored within a single parameters field.  (Of course, there is nothing to stop you making use of both methods, for different data items, within the same component).  Which approach you use for a given data item is largely a matter of personal choice, although there are some factors to consider:&lt;br /&gt;
* Core code included in the Joomla! installation makes it very easy to produce the appropriate form elements for entering data into &#039;&#039;&#039;parameters&#039;&#039;&#039; in the Back-end.  If you choose to save the data in separate fields, you will need to code the appropriate form elements yourself.&lt;br /&gt;
* Again, Joomla! core code allows you to set default values for &#039;&#039;&#039;parameters&#039;&#039;&#039; across the whole component.  Individual component items (e.g. individual articles) can then choose to use the default values, or to override them with values specific to that item.  See below for details of how to do this.&lt;br /&gt;
* It is not possible to extract individual parameter values directly from the database.  Instead, the whole parameters field must be extracted and parsed to obtain the different parameter values.  This means that it is not very easy, for example, to run MySQL queries that search for a parameter with a particular value.  Any data that you want to run queries against should be given its &#039;&#039;&#039;own table field&#039;&#039;&#039;.&lt;br /&gt;
* Similarly, it is not possible to run data validation on parameter fields before saving data.&lt;br /&gt;
In general, parameters are conventionally used to store data relating to the &#039;&#039;presentation&#039;&#039; of information.  The information itself is generally stored in separate fields.&lt;br /&gt;
&lt;br /&gt;
==Types of Component parameter==&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These parameters are set once for the whole Component, and are generally used to provide the &#039;default&#039; parameter settings for the Component on that particular site.  &lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
A menu link to an individual Component item (e.g. an article) can also have parameters associated with it, which can affect the way the Component item is displayed &#039;&#039;using that link&#039;&#039;.  The types of parameters available will depend on the way that the Component item is displayed (the &#039;view&#039; in MVC terms, but don&#039;t worry if this doesn&#039;t mean anything to you!).  However, the precise values of those parameters can be set for each menu link individually.  If there is another menu link to that same Component item, then it is important to realise each menu link may have different parameter values, and so the same article may be displayed differently in the two cases.&lt;br /&gt;
&lt;br /&gt;
A menu link can also override the Component-wide default parameters, so that the override values (if set) are used in place of the default values &#039;&#039;for that Component item when accessed via that menu link&#039;&#039;.  As you would expect, when no override value is set, the default value is used instead, in the normal manner.&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
Finally, each Component item (e.g. article) can have parameters which apply to that item, regardless of how it is accessed (i.e. via any available menu link, or even without reference to a menu at all!).  If the Component designer wants, the article specific parameters can also be set up to use the &#039;override&#039; behaviour, so that they default to the current values of the corresponding Component-wide parameters, though this is not essential.  Again, this is described further below.&lt;br /&gt;
&lt;br /&gt;
==Storing the parameters and their values.==&lt;br /&gt;
&lt;br /&gt;
In general, a set of parameters is stored within the database in a single &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; field.  Different parameters are separated by &amp;lt;code&amp;gt;newline&amp;lt;/code&amp;gt; characters (&#039;&amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;&#039; in MySQL - each parameter will appear on a different line when you look at the data in something like phpMyAdmin).  Each parameter consists of the parameter name and value, separated by an equals sign (=).  As an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
parameter1=parameter1value&lt;br /&gt;
parameter2=&lt;br /&gt;
parameter3=parameter3value&lt;br /&gt;
parameter4=parameter4value&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, parameter1, parameter3, and parameter4 have all been assigned values, whilst parameter2 has no value.  Typically, a parameter will be given no value where it is set up to allow override of a default value, but &#039;no override is required&#039; - i.e. it is desired to use the default value.&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the jos_components table, in the row corresponding to the particular component to which they apply.&lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the jos_menu table, in the row corresponding to the particular menu item to which they apply.&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in a text field in the table created by the Component.  Whilst there is no strict rule for naming the field, it is common to extend the above pattern using the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; name.  However, com_content stores article parameters in a field called &amp;lt;code&amp;gt;attribs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Accessing the parameters - Back-end==&lt;br /&gt;
&lt;br /&gt;
Joomla! includes some shortcuts to enable component creators to easily add parameter forms to the Back-end of their component.  These forms allow a site administrator to enter a parameter value by, for example, entering some text in a box, choosing from a drop-down list, or selecting a radio button.  To create these forms, each parameter needs to have an associated &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; object in an XML file.  The type of &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; object determines the form elements that will be shown in the Back-end.  A list of the available form elements is given [[Standard_parameter_types|here]].  More information is given below about the XML file names, structure and location required for each set of parameters.&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These can be created at installation of the Component, by including &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; elements in the installation XML file (typically called COMPONENT_NAME.xml, and located in the root folder of the Component package.  As far as the parameters are concerned, this XML file has the following structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;install&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;!-- Example: the following will create a line in the parameters field &lt;br /&gt;
    reading &#039;font_size=16\n&#039;: --&amp;gt;&lt;br /&gt;
    &amp;lt;param name=&amp;quot;font_size&amp;quot; default=&amp;quot;16&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/install&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Each &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; element must be given the attributes &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt;, which define the parameter name and value respectively.  These values are then copied to the jos_components table in the database.&lt;br /&gt;
&lt;br /&gt;
However, on its own this is not very useful, as it doesn&#039;t allow users to change the values of the parameters.  To do this, parameter form elements need to be defined in a file named &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; which is located in &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/&amp;lt;/code&amp;gt;.  The file should have the following structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;url addpath=&amp;quot;/administrator/components/com_COMPONENT_NAME/elements&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;param name=&amp;quot;cid&amp;quot; type=&amp;quot;JELEMENT_TYPE_NAME&amp;quot; scope=&amp;quot;com_COMPONENT_NAME&amp;quot; default=&amp;quot;0&amp;quot; label=&amp;quot;LABEL&amp;quot; description=&amp;quot;DESCRIPTION&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;param type=&amp;quot;type&amp;quot; name=&amp;quot;name&amp;quot; description=&amp;quot;description&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;!-- Example: the following will produce a text box 3 characters wide with the label &#039;Font size:&#039;.  &lt;br /&gt;
    When the user hovers the mouse over the label, a tooltip will pop up which states &#039;Please enter the &lt;br /&gt;
    required font size&#039;.  On saving, a value entered into the text box will be saved as the &#039;font_size&#039; &lt;br /&gt;
    parameter value. --&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;param type=&amp;quot;text&amp;quot; name=&amp;quot;font_size&amp;quot; size=&amp;quot;3&amp;quot; label=&amp;quot;Font size:&amp;quot; description=&amp;quot;Please enter the required font size&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/code&amp;gt; element can have any name you wish, but there must be one element at the root of the document (this is a requirement for a well-formed XML document). You can have more than one &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; element, but only the first one will be considered.  It is not currently possible to group certain parameter form elements together.&lt;br /&gt;
&lt;br /&gt;
The url parameter specifies a parameter which is added to the URL of the menu item. To enable this functionality, you must create a new class which extends JElement and put it in the administrator/components/com_COMPONENT_NAME directory. More information here: http://forum.joomla.org/viewtopic.php?f=476&amp;amp;t=206062.&lt;br /&gt;
&lt;br /&gt;
So that administrators to access these parameters, you will need to add a button to the toolbar in the Back-end of your component.  This can be done using the code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JToolBarHelper::preferences( &#039;com_COMPONENT_NAME&#039; );&lt;br /&gt;
// e.g. for the core Content component, you would use JToolBarHelper::preferences( &#039;com_content&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which is typically placed in the PHP file responsible for the Back-end output.  (For example, using an MVC structure, you might place this code at the top of &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This adds a &amp;lt;code&amp;gt;Parameters&amp;lt;/code&amp;gt; button to the toolbar:&lt;br /&gt;
&lt;br /&gt;
[[Image:Toolbar_newsfeed.png]]&lt;br /&gt;
&lt;br /&gt;
Clicking on the toolbar button produces a pop-up window containing the form fields for each parameter defined in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that there is no need to define &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; attributes for the &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; elements in the &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file, since the default values will already have been saved in the installation of the Component.&lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
A menu item is associated with a particular view from your Component&#039;s Front-end - following the menu link in the Front-end will display that view.  Joomla! 1.5 allows you to define parameters for a particular view, so that a copy of those parameters can be associated with each menu item using the view.  In addition, you can also choose to override the Component-wide default parameters defined as above, so that the override values will apply to the particular menu item.&lt;br /&gt;
&lt;br /&gt;
The view parameters are defined in an XML file stored in the &#039;&#039;Front-end&#039;&#039; view output template directory.  (This is not to be confused with the site Template directory, which is different!). The XML file has the same name as the layout used with the template. For must applications you will be using the default layout. Thus the path the XML file is something like: &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/components/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.xml&amp;lt;/code&amp;gt;.  The structure of the file is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;state&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;params&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/params&amp;gt;&lt;br /&gt;
    &amp;lt;url&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;advanced&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/advanced&amp;gt;&lt;br /&gt;
  &amp;lt;/state&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Standard parameter types]] for a full list of the core parameter types. (You can use these types within a &amp;lt;code&amp;gt;&amp;lt;url&amp;gt;&amp;lt;/code&amp;gt; section without needing to supply an &amp;lt;code&amp;gt;addpath&amp;lt;/code&amp;gt; attribute.)&lt;br /&gt;
&lt;br /&gt;
Displaying the forms for these parameters is handled automatically by the core &amp;lt;code&amp;gt;com_menus&amp;lt;/code&amp;gt; component, which creates a number of slider panes on the right hand side (at least when viewed using the default Khepri backend site Template) of the menu item edit screen.  Any parameters defined within the &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;url&amp;gt;&amp;lt;/code&amp;gt; tags will appear in the &amp;lt;code&amp;gt;Parameters - Basic&amp;lt;/code&amp;gt; slider pane.  Any parameters defined within the &amp;lt;code&amp;gt;&amp;lt;advanced&amp;gt;&amp;lt;/code&amp;gt; tag will appear in the &amp;lt;code&amp;gt;Parameters - Advanced&amp;lt;/code&amp;gt; slider pane.&lt;br /&gt;
&lt;br /&gt;
The following screenshot shows the menu admin page for the Category &#039;List&#039; layout.  You can see that the &amp;lt;code&amp;gt;Parameters - Basic&amp;lt;/code&amp;gt; slider pane is open, and contains form elements for five parameters.  There are no &#039;Advanced&#039; parameters for this view, and so the &amp;lt;code&amp;gt;Parameters - Advanced&amp;lt;/code&amp;gt; slider pane is not shown:&lt;br /&gt;
&lt;br /&gt;
[[Image:Menu items edit.png]]&lt;br /&gt;
&lt;br /&gt;
For the override of the Component-wide default parameters, &amp;lt;code&amp;gt;com_menus&amp;lt;/code&amp;gt; uses the same &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file as above, so there is no need to define these parameters again.  The override forms are automatically added to a slider pane named &amp;lt;code&amp;gt;Parameters - Component&amp;lt;/code&amp;gt;.  However, there are a number of changes from the forms used in the Preferences pop-up window (despite being based on the same &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file):&lt;br /&gt;
* Any &amp;lt;code&amp;gt;&amp;lt;param type=&amp;quot;radio&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; parameter is shown not as a radio button form field, but by a drop-down list.&lt;br /&gt;
* All drop-down lists (both those defined as such in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt;, and those defined as radio buttons) are given an extra  option.  This extra option displays the text &amp;quot;Use Global&amp;quot; but has an associated value of an empty string.  The &amp;quot;Use Global&amp;quot; option is set as the default option for the list.  Thus, by default, these parameters will use the Component-wide default values, rather than overriding them.  (However, note that any text box fields defined with a default value in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; retain that default value, and so will override the component-wide default value if that is different).&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are defined in an XML file which can be stored anywhere you like, but is typically placed within the &amp;lt;code&amp;gt;models&amp;lt;/code&amp;gt; folder of the Component Back-end (if you are using an MVC structure) and named according to the model to which they apply, i.e. &amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/models/MODEL_NAME.xml&amp;lt;/code&amp;gt;.  The XML file has the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  &amp;lt;params group=&amp;quot;GROUP_NAME&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, you can give the &amp;lt;code&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/code&amp;gt; element whatever name you wish.  You can also have as many &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; groups as you like, though each group must have a &amp;lt;code&amp;gt;group&amp;lt;/code&amp;gt; attribute with a different &amp;lt;code&amp;gt;GROUP_NAME&amp;lt;/code&amp;gt;.  If there are two or more &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; groups with the same &amp;lt;code&amp;gt;GROUP_NAME&amp;lt;/code&amp;gt;, only the last one in the list will be considered.&lt;br /&gt;
&lt;br /&gt;
To display the forms for these parameters in the Back-end of your Component, you will need to do a little work yourself.  Firstly, you need to access the saved parameter data from the database.  For this, you will need to identify both the location of the stored parameters data in the database, and the XML file that you are using to define the parameter form fields.  Assuming that you have already created a &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt; variable to hold your component item (i.e. &#039;article&#039;) data, that the parameters data is stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt;, and that the XML file is located in the models folder as specified above, you could use the following code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$paramsdata = $row-&amp;gt;params;&lt;br /&gt;
$paramsdefs = JPATH_COMPONENT.DS.&#039;models&#039;.DS.&#039;MODEL_NAME.xml&#039;;&lt;br /&gt;
$params = new JParameter( $paramsdata, $paramsdefs );&lt;br /&gt;
&lt;br /&gt;
$this-&amp;gt;assignRef(&#039;params&#039;, $params);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This code is typically placed in the View file (e.g. view.html.php) within the corresponding folder.&lt;br /&gt;
&lt;br /&gt;
To display the parameters forms in slider panes (in the same way that they are displayed in the menu item Back-end), you should use the following code in the template file (e.g. &amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.php&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$pane =&amp;amp; JPane::getInstance( &#039;sliders&#039; );&lt;br /&gt;
&lt;br /&gt;
echo $pane-&amp;gt;startPane( &#039;content-pane&#039; );&lt;br /&gt;
&lt;br /&gt;
// First slider panel&lt;br /&gt;
// Create a slider panel with a title of SLIDER_PANEL_1_TITLE and a title id attribute of SLIDER_PANEL_1_NAME&lt;br /&gt;
echo $pane-&amp;gt;startPanel( JText::_( &#039;SLIDER_PANEL_1_TITLE&#039; ), &#039;SLIDER_PANEL_1_NAME&#039; );&lt;br /&gt;
// Display the parameters defined in the &amp;lt;params&amp;gt; group with no &#039;group&#039; attribute&lt;br /&gt;
echo $this-&amp;gt;params-&amp;gt;render( &#039;params&#039; );&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
&lt;br /&gt;
//Second slider panel&lt;br /&gt;
// Create a slider panel with a title of SLIDER_PANEL_2_TITLE and a title id attribute of SLIDER_PANEL_2_NAME&lt;br /&gt;
echo $pane-&amp;gt;startPanel( JText::_( &#039;SLIDER_PANEL_2_TITLE&#039; ), &#039;SLIDER_PANEL_2_NAME&#039; );&lt;br /&gt;
// Display the parameters defined in the &amp;lt;params&amp;gt; group with the &#039;group&#039; attribute of &#039;GROUP_NAME&#039;&lt;br /&gt;
echo $this-&amp;gt;params-&amp;gt;render( &#039;params&#039;, &#039;GROUP_NAME&#039; );&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
&lt;br /&gt;
// Repeat for each additional slider panel required&lt;br /&gt;
&lt;br /&gt;
echo $pane-&amp;gt;endPane();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
In order to save the parameters to the database you have to overload the bind() function which can be found in &lt;br /&gt;
&amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/com_COMPONENT_NAME/tables/COMPONENT_NAME.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
{&lt;br /&gt;
	if (key_exists( &#039;params&#039;, $array ) &amp;amp;&amp;amp; is_array( $array[&#039;params&#039;] ))&lt;br /&gt;
	{&lt;br /&gt;
		$registry = new JRegistry();&lt;br /&gt;
		$registry-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
		$array[&#039;params&#039;] = $registry-&amp;gt;toString();&lt;br /&gt;
	}&lt;br /&gt;
	return parent::bind($array, $ignore);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessing the parameters - frontend==&lt;br /&gt;
&lt;br /&gt;
The Front-end situation is a bit more complex than the Back-end.  The &#039;standard&#039; way to deal with parameters in the Front-end is to set up a cascade of overrides, as described above:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Item-specific &#039;&#039;overrides&#039;&#039; Menu-specific &#039;&#039;overrides&#039;&#039; Component-default&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
If you &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want to do this, then a little extra work is required&lt;br /&gt;
&lt;br /&gt;
===With overrides===&lt;br /&gt;
&lt;br /&gt;
The following code will access the Component-wide default parameters, &#039;&#039;already overridden&#039;&#039; with those for the menu item (if applicable):&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;
  $params = &amp;amp;JComponentHelper::getParams( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
&lt;br /&gt;
  // e.g. for the com_weblinks component, you would use:&lt;br /&gt;
  // $params = &amp;amp;JComponentHelper::getParams( &#039;com_weblinks&#039; )&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an MVC structure, this code would be placed in the &amp;lt;code&amp;gt;view.html.php&amp;lt;/code&amp;gt; file for the particular view required.&lt;br /&gt;
&lt;br /&gt;
Assuming that the item parameters are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field, and that the particular item has been loaded into the &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt; object by the method, you would then add in the item parameters to the &amp;lt;code&amp;gt;$params&amp;lt;/code&amp;gt; object using:&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;
  $params-&amp;gt;merge( new JParameter( &amp;amp;$row-&amp;gt;params ) );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, in both cases (i.e. overrides by menu-specific parameters, and overrides by item-specific parameters), we aren&#039;t &#039;&#039;just&#039;&#039; doing overrides - we also add in any new parameters that weren&#039;t found in the defaults.  In other words, the &amp;lt;code&amp;gt;$params&amp;lt;/code&amp;gt; object ends up with all the parameters we need!&lt;br /&gt;
&lt;br /&gt;
To access the value of a specific parameter, we would use:&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;
  $params-&amp;gt;get( &#039;PARAMETER_NAME&#039; );&lt;br /&gt;
&lt;br /&gt;
  // e.g. to obtain the value of &#039;parameter1&#039;, we use:&lt;br /&gt;
  // $params-&amp;gt;get( &#039;parameter1&#039; );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to realise that any &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; carried out is persistent, so the following code (where for example you have an array containing the parameters sets for several items, and you want the parameters for each item to individually override the defaults) would not produce the result you might expect:&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;
  foreach ($itemparamsgroup as $itemparams)&lt;br /&gt;
  {&lt;br /&gt;
    $params = &amp;amp;JComponentHelper::getParams( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
    $params-&amp;gt;merge( $itemparams );&lt;br /&gt;
    echo $params-&amp;gt;get( &#039;PARAMETER_NAME&#039; );&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In such cases, you will need to use the non-override method, and then force the overrides manually, as described below.&lt;br /&gt;
&lt;br /&gt;
===Without overrides===&lt;br /&gt;
&lt;br /&gt;
There will be cases where you don&#039;t want to use the default override pattern. For example, you may want to ignore the menu-specific parameters, and have only the item-specific parameters overriding the defaults. This is a little more difficult to accomplish, although it can still be done.&lt;br /&gt;
&lt;br /&gt;
You can access the Component-wide default parameter values, &#039;&#039;without the menu overrides&#039;&#039;, as follows:&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;
  $component = JComponentHelper::getComponent( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
  $params = new JParameter( $component-&amp;gt;params );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to override these with the menu parameters, but &#039;&#039;without&#039;&#039; the &#039;persistence&#039; effect described above, you can:&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;
  $menuitemid = JRequest::getInt( &#039;Itemid&#039; );&lt;br /&gt;
  if ($menuitemid)&lt;br /&gt;
  {&lt;br /&gt;
    $menu = JSite::getMenu();&lt;br /&gt;
    $menuparams = $menu-&amp;gt;getParams( $menuitemid );&lt;br /&gt;
    $params-&amp;gt;merge( $menuparams );&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the item parameters as before, and choose whether to merge them in using the code above, or simply store them in a separate object:&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;
  $itemparams = new JParameter( $row-&amp;gt;params );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can combine this code to achieve the effect that you want.  For example, you could override the Component-wide defaults with the item-specific parameters, but ignore those for the menu.  Or you could use the menu-specific parameters in some circumstances, and the item-specific ones in others.  [Whenever you depart from the standard approach, though, you should be careful that you inform your users how your Component works.  Users will expect your component to work the same way as those from the Joomla! core, so you should have a good reason for departing from this approach.]&lt;br /&gt;
&lt;br /&gt;
Accessing the value of a particular parameter is done in the same way as described above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Development]][[Category:Components]][[Category:Parameters]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JimDeLaHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=15722</id>
		<title>J1.5:Component parameters</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=15722"/>
		<updated>2009-09-19T10:18:09Z</updated>

		<summary type="html">&lt;p&gt;JimDeLaHunt: /* 2. Menu item specific parameters */ Clarify that &amp;lt;url&amp;gt; is peer to &amp;lt;params&amp;gt; and also contains &amp;lt;param ... /&amp;gt; elements.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
One thing that sets Joomla! Components apart from other types of Extension (i.e. Modules and Plugins) is the ability to store significant quantities of data in the Joomla! MySQL database.  Typically, this data will be content for displaying on a page (such as the content of an article, or its title) or data about how that content should be displayed (e.g. a setting specifying whether or not the title should be shown).  A Component normally creates at least one table in the database to store this data - for example, data for articles associated with the &amp;lt;code&amp;gt;com_content&amp;lt;/code&amp;gt; Component are stored in the &amp;lt;code&amp;gt;jos_content&amp;lt;/code&amp;gt; table (where &#039;&#039;jos&#039;&#039; is the table prefix for the site).&lt;br /&gt;
&lt;br /&gt;
However, choosing exactly how to store each item of data requires a little more thought.  There are essentially two choices:  each data item may be stored in its own field, or a collection of data items may be stored within a single parameters field.  (Of course, there is nothing to stop you making use of both methods, for different data items, within the same component).  Which approach you use for a given data item is largely a matter of personal choice, although there are some factors to consider:&lt;br /&gt;
* Core code included in the Joomla! installation makes it very easy to produce the appropriate form elements for entering data into &#039;&#039;&#039;parameters&#039;&#039;&#039; in the Back-end.  If you choose to save the data in separate fields, you will need to code the appropriate form elements yourself.&lt;br /&gt;
* Again, Joomla! core code allows you to set default values for &#039;&#039;&#039;parameters&#039;&#039;&#039; across the whole component.  Individual component items (e.g. individual articles) can then choose to use the default values, or to override them with values specific to that item.  See below for details of how to do this.&lt;br /&gt;
* It is not possible to extract individual parameter values directly from the database.  Instead, the whole parameters field must be extracted and parsed to obtain the different parameter values.  This means that it is not very easy, for example, to run MySQL queries that search for a parameter with a particular value.  Any data that you want to run queries against should be given its &#039;&#039;&#039;own table field&#039;&#039;&#039;.&lt;br /&gt;
* Similarly, it is not possible to run data validation on parameter fields before saving data.&lt;br /&gt;
In general, parameters are conventionally used to store data relating to the &#039;&#039;presentation&#039;&#039; of information.  The information itself is generally stored in separate fields.&lt;br /&gt;
&lt;br /&gt;
==Types of Component parameter==&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These parameters are set once for the whole Component, and are generally used to provide the &#039;default&#039; parameter settings for the Component on that particular site.  &lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
A menu link to an individual Component item (e.g. an article) can also have parameters associated with it, which can affect the way the Component item is displayed &#039;&#039;using that link&#039;&#039;.  The types of parameters available will depend on the way that the Component item is displayed (the &#039;view&#039; in MVC terms, but don&#039;t worry if this doesn&#039;t mean anything to you!).  However, the precise values of those parameters can be set for each menu link individually.  If there is another menu link to that same Component item, then it is important to realise each menu link may have different parameter values, and so the same article may be displayed differently in the two cases.&lt;br /&gt;
&lt;br /&gt;
A menu link can also override the Component-wide default parameters, so that the override values (if set) are used in place of the default values &#039;&#039;for that Component item when accessed via that menu link&#039;&#039;.  As you would expect, when no override value is set, the default value is used instead, in the normal manner.&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
Finally, each Component item (e.g. article) can have parameters which apply to that item, regardless of how it is accessed (i.e. via any available menu link, or even without reference to a menu at all!).  If the Component designer wants, the article specific parameters can also be set up to use the &#039;override&#039; behaviour, so that they default to the current values of the corresponding Component-wide parameters, though this is not essential.  Again, this is described further below.&lt;br /&gt;
&lt;br /&gt;
==Storing the parameters and their values.==&lt;br /&gt;
&lt;br /&gt;
In general, a set of parameters is stored within the database in a single &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; field.  Different parameters are separated by &amp;lt;code&amp;gt;newline&amp;lt;/code&amp;gt; characters (&#039;&amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;&#039; in MySQL - each parameter will appear on a different line when you look at the data in something like phpMyAdmin).  Each parameter consists of the parameter name and value, separated by an equals sign (=).  As an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
parameter1=parameter1value&lt;br /&gt;
parameter2=&lt;br /&gt;
parameter3=parameter3value&lt;br /&gt;
parameter4=parameter4value&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, parameter1, parameter3, and parameter4 have all been assigned values, whilst parameter2 has no value.  Typically, a parameter will be given no value where it is set up to allow override of a default value, but &#039;no override is required&#039; - i.e. it is desired to use the default value.&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the jos_components table, in the row corresponding to the particular component to which they apply.&lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the jos_menu table, in the row corresponding to the particular menu item to which they apply.&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in a text field in the table created by the Component.  Whilst there is no strict rule for naming the field, it is common to extend the above pattern using the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; name.  However, com_content stores article parameters in a field called &amp;lt;code&amp;gt;attribs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Accessing the parameters - Back-end==&lt;br /&gt;
&lt;br /&gt;
Joomla! includes some shortcuts to enable component creators to easily add parameter forms to the Back-end of their component.  These forms allow a site administrator to enter a parameter value by, for example, entering some text in a box, choosing from a drop-down list, or selecting a radio button.  To create these forms, each parameter needs to have an associated &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; object in an XML file.  The type of &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; object determines the form elements that will be shown in the Back-end.  A list of the available form elements is given [[Standard_parameter_types|here]].  More information is given below about the XML file names, structure and location required for each set of parameters.&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These can be created at installation of the Component, by including &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; elements in the installation XML file (typically called COMPONENT_NAME.xml, and located in the root folder of the Component package.  As far as the parameters are concerned, this XML file has the following structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;install&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;!-- Example: the following will create a line in the parameters field &lt;br /&gt;
    reading &#039;font_size=16\n&#039;: --&amp;gt;&lt;br /&gt;
    &amp;lt;param name=&amp;quot;font_size&amp;quot; default=&amp;quot;16&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/install&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Each &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; element must be given the attributes &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt;, which define the parameter name and value respectively.  These values are then copied to the jos_components table in the database.&lt;br /&gt;
&lt;br /&gt;
However, on its own this is not very useful, as it doesn&#039;t allow users to change the values of the parameters.  To do this, parameter form elements need to be defined in a file named &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; which is located in &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/&amp;lt;/code&amp;gt;.  The file should have the following structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;url addpath=&amp;quot;/administrator/components/com_COMPONENT_NAME/elements&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;param name=&amp;quot;cid&amp;quot; type=&amp;quot;JELEMENT_TYPE_NAME&amp;quot; scope=&amp;quot;com_COMPONENT_NAME&amp;quot; default=&amp;quot;0&amp;quot; label=&amp;quot;LABEL&amp;quot; description=&amp;quot;DESCRIPTION&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;param type=&amp;quot;type&amp;quot; name=&amp;quot;name&amp;quot; description=&amp;quot;description&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;!-- Example: the following will produce a text box 3 characters wide with the label &#039;Font size:&#039;.  &lt;br /&gt;
    When the user hovers the mouse over the label, a tooltip will pop up which states &#039;Please enter the &lt;br /&gt;
    required font size&#039;.  On saving, a value entered into the text box will be saved as the &#039;font_size&#039; &lt;br /&gt;
    parameter value. --&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;param type=&amp;quot;text&amp;quot; name=&amp;quot;font_size&amp;quot; size=&amp;quot;3&amp;quot; label=&amp;quot;Font size:&amp;quot; description=&amp;quot;Please enter the required font size&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/code&amp;gt; element can have any name you wish, but there must be one element at the root of the document (this is a requirement for a well-formed XML document). You can have more than one &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; element, but only the first one will be considered.  It is not currently possible to group certain parameter form elements together.&lt;br /&gt;
&lt;br /&gt;
The url parameter specifies a parameter which is added to the URL of the menu item. To enable this functionality, you must create a new class which extends JElement and put it in the administrator/components/com_COMPONENT_NAME directory. More information here: http://forum.joomla.org/viewtopic.php?f=476&amp;amp;t=206062.&lt;br /&gt;
&lt;br /&gt;
So that administrators to access these parameters, you will need to add a button to the toolbar in the Back-end of your component.  This can be done using the code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JToolBarHelper::preferences( &#039;com_COMPONENT_NAME&#039; );&lt;br /&gt;
// e.g. for the core Content component, you would use JToolBarHelper::preferences( &#039;com_content&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which is typically placed in the PHP file responsible for the Back-end output.  (For example, using an MVC structure, you might place this code at the top of &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This adds a &amp;lt;code&amp;gt;Parameters&amp;lt;/code&amp;gt; button to the toolbar:&lt;br /&gt;
&lt;br /&gt;
[[Image:Toolbar_newsfeed.png]]&lt;br /&gt;
&lt;br /&gt;
Clicking on the toolbar button produces a pop-up window containing the form fields for each parameter defined in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that there is no need to define &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; attributes for the &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; elements in the &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file, since the default values will already have been saved in the installation of the Component.&lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
A menu item is associated with a particular view from your Component&#039;s Front-end - following the menu link in the Front-end will display that view.  Joomla! 1.5 allows you to define parameters for a particular view, so that a copy of those parameters can be associated with each menu item using the view.  In addition, you can also choose to override the Component-wide default parameters defined as above, so that the override values will apply to the particular menu item.&lt;br /&gt;
&lt;br /&gt;
The view parameters are defined in an XML file stored in the &#039;&#039;Front-end&#039;&#039; view output template directory.  (This is not to be confused with the site Template directory, which is different!). The XML file has the same name as the layout used with the template. For must applications you will be using the default layout. Thus the path the XML file is something like: &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/components/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.xml&amp;lt;/code&amp;gt;.  The structure of the file is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;state&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;params&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/params&amp;gt;&lt;br /&gt;
    &amp;lt;url&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;advanced&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/advanced&amp;gt;&lt;br /&gt;
  &amp;lt;/state&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Standard parameter types]] for a full list of the core parameter types.&lt;br /&gt;
&lt;br /&gt;
Displaying the forms for these parameters is handled automatically by the core &amp;lt;code&amp;gt;com_menus&amp;lt;/code&amp;gt; component, which creates a number of slider panes on the right hand side (at least when viewed using the default Khepri backend site Template) of the menu item edit screen.  Any parameters defined within the &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; tags will appear in the &amp;lt;code&amp;gt;Parameters - Basic&amp;lt;/code&amp;gt; slider pane.  Any parameters defined within the &amp;lt;code&amp;gt;&amp;lt;advanced&amp;gt;&amp;lt;/code&amp;gt; tag will appear in the &amp;lt;code&amp;gt;Parameters - Advanced&amp;lt;/code&amp;gt; slider pane.&lt;br /&gt;
&lt;br /&gt;
The following screenshot shows the menu admin page for the Category &#039;List&#039; layout.  You can see that the &amp;lt;code&amp;gt;Parameters - Basic&amp;lt;/code&amp;gt; slider pane is open, and contains form elements for five parameters.  There are no &#039;Advanced&#039; parameters for this view, and so the &amp;lt;code&amp;gt;Parameters - Advanced&amp;lt;/code&amp;gt; slider pane is not shown:&lt;br /&gt;
&lt;br /&gt;
[[Image:Menu items edit.png]]&lt;br /&gt;
&lt;br /&gt;
For the override of the Component-wide default parameters, &amp;lt;code&amp;gt;com_menus&amp;lt;/code&amp;gt; uses the same &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file as above, so there is no need to define these parameters again.  The override forms are automatically added to a slider pane named &amp;lt;code&amp;gt;Parameters - Component&amp;lt;/code&amp;gt;.  However, there are a number of changes from the forms used in the Preferences pop-up window (despite being based on the same &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file):&lt;br /&gt;
* Any &amp;lt;code&amp;gt;&amp;lt;param type=&amp;quot;radio&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; parameter is shown not as a radio button form field, but by a drop-down list.&lt;br /&gt;
* All drop-down lists (both those defined as such in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt;, and those defined as radio buttons) are given an extra  option.  This extra option displays the text &amp;quot;Use Global&amp;quot; but has an associated value of an empty string.  The &amp;quot;Use Global&amp;quot; option is set as the default option for the list.  Thus, by default, these parameters will use the Component-wide default values, rather than overriding them.  (However, note that any text box fields defined with a default value in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; retain that default value, and so will override the component-wide default value if that is different).&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are defined in an XML file which can be stored anywhere you like, but is typically placed within the &amp;lt;code&amp;gt;models&amp;lt;/code&amp;gt; folder of the Component Back-end (if you are using an MVC structure) and named according to the model to which they apply, i.e. &amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/models/MODEL_NAME.xml&amp;lt;/code&amp;gt;.  The XML file has the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  &amp;lt;params group=&amp;quot;GROUP_NAME&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, you can give the &amp;lt;code&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/code&amp;gt; element whatever name you wish.  You can also have as many &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; groups as you like, though each group must have a &amp;lt;code&amp;gt;group&amp;lt;/code&amp;gt; attribute with a different &amp;lt;code&amp;gt;GROUP_NAME&amp;lt;/code&amp;gt;.  If there are two or more &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; groups with the same &amp;lt;code&amp;gt;GROUP_NAME&amp;lt;/code&amp;gt;, only the last one in the list will be considered.&lt;br /&gt;
&lt;br /&gt;
To display the forms for these parameters in the Back-end of your Component, you will need to do a little work yourself.  Firstly, you need to access the saved parameter data from the database.  For this, you will need to identify both the location of the stored parameters data in the database, and the XML file that you are using to define the parameter form fields.  Assuming that you have already created a &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt; variable to hold your component item (i.e. &#039;article&#039;) data, that the parameters data is stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt;, and that the XML file is located in the models folder as specified above, you could use the following code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$paramsdata = $row-&amp;gt;params;&lt;br /&gt;
$paramsdefs = JPATH_COMPONENT.DS.&#039;models&#039;.DS.&#039;MODEL_NAME.xml&#039;;&lt;br /&gt;
$params = new JParameter( $paramsdata, $paramsdefs );&lt;br /&gt;
&lt;br /&gt;
$this-&amp;gt;assignRef(&#039;params&#039;, $params);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This code is typically placed in the View file (e.g. view.html.php) within the corresponding folder.&lt;br /&gt;
&lt;br /&gt;
To display the parameters forms in slider panes (in the same way that they are displayed in the menu item Back-end), you should use the following code in the template file (e.g. &amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.php&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$pane =&amp;amp; JPane::getInstance( &#039;sliders&#039; );&lt;br /&gt;
&lt;br /&gt;
echo $pane-&amp;gt;startPane( &#039;content-pane&#039; );&lt;br /&gt;
&lt;br /&gt;
// First slider panel&lt;br /&gt;
// Create a slider panel with a title of SLIDER_PANEL_1_TITLE and a title id attribute of SLIDER_PANEL_1_NAME&lt;br /&gt;
echo $pane-&amp;gt;startPanel( JText::_( &#039;SLIDER_PANEL_1_TITLE&#039; ), &#039;SLIDER_PANEL_1_NAME&#039; );&lt;br /&gt;
// Display the parameters defined in the &amp;lt;params&amp;gt; group with no &#039;group&#039; attribute&lt;br /&gt;
echo $this-&amp;gt;params-&amp;gt;render( &#039;params&#039; );&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
&lt;br /&gt;
//Second slider panel&lt;br /&gt;
// Create a slider panel with a title of SLIDER_PANEL_2_TITLE and a title id attribute of SLIDER_PANEL_2_NAME&lt;br /&gt;
echo $pane-&amp;gt;startPanel( JText::_( &#039;SLIDER_PANEL_2_TITLE&#039; ), &#039;SLIDER_PANEL_2_NAME&#039; );&lt;br /&gt;
// Display the parameters defined in the &amp;lt;params&amp;gt; group with the &#039;group&#039; attribute of &#039;GROUP_NAME&#039;&lt;br /&gt;
echo $this-&amp;gt;params-&amp;gt;render( &#039;params&#039;, &#039;GROUP_NAME&#039; );&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
&lt;br /&gt;
// Repeat for each additional slider panel required&lt;br /&gt;
&lt;br /&gt;
echo $pane-&amp;gt;endPane();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
In order to save the parameters to the database you have to overload the bind() function which can be found in &lt;br /&gt;
&amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/com_COMPONENT_NAME/tables/COMPONENT_NAME.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
{&lt;br /&gt;
	if (key_exists( &#039;params&#039;, $array ) &amp;amp;&amp;amp; is_array( $array[&#039;params&#039;] ))&lt;br /&gt;
	{&lt;br /&gt;
		$registry = new JRegistry();&lt;br /&gt;
		$registry-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
		$array[&#039;params&#039;] = $registry-&amp;gt;toString();&lt;br /&gt;
	}&lt;br /&gt;
	return parent::bind($array, $ignore);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessing the parameters - frontend==&lt;br /&gt;
&lt;br /&gt;
The Front-end situation is a bit more complex than the Back-end.  The &#039;standard&#039; way to deal with parameters in the Front-end is to set up a cascade of overrides, as described above:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Item-specific &#039;&#039;overrides&#039;&#039; Menu-specific &#039;&#039;overrides&#039;&#039; Component-default&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
If you &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want to do this, then a little extra work is required&lt;br /&gt;
&lt;br /&gt;
===With overrides===&lt;br /&gt;
&lt;br /&gt;
The following code will access the Component-wide default parameters, &#039;&#039;already overridden&#039;&#039; with those for the menu item (if applicable):&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;
  $params = &amp;amp;JComponentHelper::getParams( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
&lt;br /&gt;
  // e.g. for the com_weblinks component, you would use:&lt;br /&gt;
  // $params = &amp;amp;JComponentHelper::getParams( &#039;com_weblinks&#039; )&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an MVC structure, this code would be placed in the &amp;lt;code&amp;gt;view.html.php&amp;lt;/code&amp;gt; file for the particular view required.&lt;br /&gt;
&lt;br /&gt;
Assuming that the item parameters are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field, and that the particular item has been loaded into the &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt; object by the method, you would then add in the item parameters to the &amp;lt;code&amp;gt;$params&amp;lt;/code&amp;gt; object using:&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;
  $params-&amp;gt;merge( new JParameter( &amp;amp;$row-&amp;gt;params ) );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, in both cases (i.e. overrides by menu-specific parameters, and overrides by item-specific parameters), we aren&#039;t &#039;&#039;just&#039;&#039; doing overrides - we also add in any new parameters that weren&#039;t found in the defaults.  In other words, the &amp;lt;code&amp;gt;$params&amp;lt;/code&amp;gt; object ends up with all the parameters we need!&lt;br /&gt;
&lt;br /&gt;
To access the value of a specific parameter, we would use:&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;
  $params-&amp;gt;get( &#039;PARAMETER_NAME&#039; );&lt;br /&gt;
&lt;br /&gt;
  // e.g. to obtain the value of &#039;parameter1&#039;, we use:&lt;br /&gt;
  // $params-&amp;gt;get( &#039;parameter1&#039; );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to realise that any &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; carried out is persistent, so the following code (where for example you have an array containing the parameters sets for several items, and you want the parameters for each item to individually override the defaults) would not produce the result you might expect:&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;
  foreach ($itemparamsgroup as $itemparams)&lt;br /&gt;
  {&lt;br /&gt;
    $params = &amp;amp;JComponentHelper::getParams( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
    $params-&amp;gt;merge( $itemparams );&lt;br /&gt;
    echo $params-&amp;gt;get( &#039;PARAMETER_NAME&#039; );&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In such cases, you will need to use the non-override method, and then force the overrides manually, as described below.&lt;br /&gt;
&lt;br /&gt;
===Without overrides===&lt;br /&gt;
&lt;br /&gt;
There will be cases where you don&#039;t want to use the default override pattern. For example, you may want to ignore the menu-specific parameters, and have only the item-specific parameters overriding the defaults. This is a little more difficult to accomplish, although it can still be done.&lt;br /&gt;
&lt;br /&gt;
You can access the Component-wide default parameter values, &#039;&#039;without the menu overrides&#039;&#039;, as follows:&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;
  $component = JComponentHelper::getComponent( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
  $params = new JParameter( $component-&amp;gt;params );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to override these with the menu parameters, but &#039;&#039;without&#039;&#039; the &#039;persistence&#039; effect described above, you can:&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;
  $menuitemid = JRequest::getInt( &#039;Itemid&#039; );&lt;br /&gt;
  if ($menuitemid)&lt;br /&gt;
  {&lt;br /&gt;
    $menu = JSite::getMenu();&lt;br /&gt;
    $menuparams = $menu-&amp;gt;getParams( $menuitemid );&lt;br /&gt;
    $params-&amp;gt;merge( $menuparams );&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the item parameters as before, and choose whether to merge them in using the code above, or simply store them in a separate object:&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;
  $itemparams = new JParameter( $row-&amp;gt;params );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can combine this code to achieve the effect that you want.  For example, you could override the Component-wide defaults with the item-specific parameters, but ignore those for the menu.  Or you could use the menu-specific parameters in some circumstances, and the item-specific ones in others.  [Whenever you depart from the standard approach, though, you should be careful that you inform your users how your Component works.  Users will expect your component to work the same way as those from the Joomla! core, so you should have a good reason for departing from this approach.]&lt;br /&gt;
&lt;br /&gt;
Accessing the value of a particular parameter is done in the same way as described above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Development]][[Category:Components]][[Category:Parameters]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JimDeLaHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=15653</id>
		<title>J1.5:Component parameters</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=15653"/>
		<updated>2009-09-19T08:49:30Z</updated>

		<summary type="html">&lt;p&gt;JimDeLaHunt: /* 2. Menu item specific parameters */ Clarified path of the XML file.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
One thing that sets Joomla! Components apart from other types of Extension (i.e. Modules and Plugins) is the ability to store significant quantities of data in the Joomla! MySQL database.  Typically, this data will be content for displaying on a page (such as the content of an article, or its title) or data about how that content should be displayed (e.g. a setting specifying whether or not the title should be shown).  A Component normally creates at least one table in the database to store this data - for example, data for articles associated with the &amp;lt;code&amp;gt;com_content&amp;lt;/code&amp;gt; Component are stored in the &amp;lt;code&amp;gt;jos_content&amp;lt;/code&amp;gt; table (where &#039;&#039;jos&#039;&#039; is the table prefix for the site).&lt;br /&gt;
&lt;br /&gt;
However, choosing exactly how to store each item of data requires a little more thought.  There are essentially two choices:  each data item may be stored in its own field, or a collection of data items may be stored within a single parameters field.  (Of course, there is nothing to stop you making use of both methods, for different data items, within the same component).  Which approach you use for a given data item is largely a matter of personal choice, although there are some factors to consider:&lt;br /&gt;
* Core code included in the Joomla! installation makes it very easy to produce the appropriate form elements for entering data into &#039;&#039;&#039;parameters&#039;&#039;&#039; in the Back-end.  If you choose to save the data in separate fields, you will need to code the appropriate form elements yourself.&lt;br /&gt;
* Again, Joomla! core code allows you to set default values for &#039;&#039;&#039;parameters&#039;&#039;&#039; across the whole component.  Individual component items (e.g. individual articles) can then choose to use the default values, or to override them with values specific to that item.  See below for details of how to do this.&lt;br /&gt;
* It is not possible to extract individual parameter values directly from the database.  Instead, the whole parameters field must be extracted and parsed to obtain the different parameter values.  This means that it is not very easy, for example, to run MySQL queries that search for a parameter with a particular value.  Any data that you want to run queries against should be given its &#039;&#039;&#039;own table field&#039;&#039;&#039;.&lt;br /&gt;
* Similarly, it is not possible to run data validation on parameter fields before saving data.&lt;br /&gt;
In general, parameters are conventionally used to store data relating to the &#039;&#039;presentation&#039;&#039; of information.  The information itself is generally stored in separate fields.&lt;br /&gt;
&lt;br /&gt;
==Types of Component parameter==&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These parameters are set once for the whole Component, and are generally used to provide the &#039;default&#039; parameter settings for the Component on that particular site.  &lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
A menu link to an individual Component item (e.g. an article) can also have parameters associated with it, which can affect the way the Component item is displayed &#039;&#039;using that link&#039;&#039;.  The types of parameters available will depend on the way that the Component item is displayed (the &#039;view&#039; in MVC terms, but don&#039;t worry if this doesn&#039;t mean anything to you!).  However, the precise values of those parameters can be set for each menu link individually.  If there is another menu link to that same Component item, then it is important to realise each menu link may have different parameter values, and so the same article may be displayed differently in the two cases.&lt;br /&gt;
&lt;br /&gt;
A menu link can also override the Component-wide default parameters, so that the override values (if set) are used in place of the default values &#039;&#039;for that Component item when accessed via that menu link&#039;&#039;.  As you would expect, when no override value is set, the default value is used instead, in the normal manner.&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
Finally, each Component item (e.g. article) can have parameters which apply to that item, regardless of how it is accessed (i.e. via any available menu link, or even without reference to a menu at all!).  If the Component designer wants, the article specific parameters can also be set up to use the &#039;override&#039; behaviour, so that they default to the current values of the corresponding Component-wide parameters, though this is not essential.  Again, this is described further below.&lt;br /&gt;
&lt;br /&gt;
==Storing the parameters and their values.==&lt;br /&gt;
&lt;br /&gt;
In general, a set of parameters is stored within the database in a single &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; field.  Different parameters are separated by &amp;lt;code&amp;gt;newline&amp;lt;/code&amp;gt; characters (&#039;&amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;&#039; in MySQL - each parameter will appear on a different line when you look at the data in something like phpMyAdmin).  Each parameter consists of the parameter name and value, separated by an equals sign (=).  As an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
parameter1=parameter1value&lt;br /&gt;
parameter2=&lt;br /&gt;
parameter3=parameter3value&lt;br /&gt;
parameter4=parameter4value&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, parameter1, parameter3, and parameter4 have all been assigned values, whilst parameter2 has no value.  Typically, a parameter will be given no value where it is set up to allow override of a default value, but &#039;no override is required&#039; - i.e. it is desired to use the default value.&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the jos_components table, in the row corresponding to the particular component to which they apply.&lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the jos_menu table, in the row corresponding to the particular menu item to which they apply.&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in a text field in the table created by the Component.  Whilst there is no strict rule for naming the field, it is common to extend the above pattern using the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; name.  However, com_content stores article parameters in a field called &amp;lt;code&amp;gt;attribs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Accessing the parameters - Back-end==&lt;br /&gt;
&lt;br /&gt;
Joomla! includes some shortcuts to enable component creators to easily add parameter forms to the Back-end of their component.  These forms allow a site administrator to enter a parameter value by, for example, entering some text in a box, choosing from a drop-down list, or selecting a radio button.  To create these forms, each parameter needs to have an associated &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; object in an XML file.  The type of &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; object determines the form elements that will be shown in the Back-end.  A list of the available form elements is given [[Standard_parameter_types|here]].  More information is given below about the XML file names, structure and location required for each set of parameters.&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These can be created at installation of the Component, by including &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; elements in the installation XML file (typically called COMPONENT_NAME.xml, and located in the root folder of the Component package.  As far as the parameters are concerned, this XML file has the following structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;install&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;!-- Example: the following will create a line in the parameters field &lt;br /&gt;
    reading &#039;font_size=16\n&#039;: --&amp;gt;&lt;br /&gt;
    &amp;lt;param name=&amp;quot;font_size&amp;quot; default=&amp;quot;16&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/install&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Each &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; element must be given the attributes &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt;, which define the parameter name and value respectively.  These values are then copied to the jos_components table in the database.&lt;br /&gt;
&lt;br /&gt;
However, on its own this is not very useful, as it doesn&#039;t allow users to change the values of the parameters.  To do this, parameter form elements need to be defined in a file named &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; which is located in &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/&amp;lt;/code&amp;gt;.  The file should have the following structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;url addpath=&amp;quot;/administrator/components/com_COMPONENT_NAME/elements&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;param name=&amp;quot;cid&amp;quot; type=&amp;quot;JELEMENT_TYPE_NAME&amp;quot; scope=&amp;quot;com_COMPONENT_NAME&amp;quot; default=&amp;quot;0&amp;quot; label=&amp;quot;LABEL&amp;quot; description=&amp;quot;DESCRIPTION&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;param type=&amp;quot;type&amp;quot; name=&amp;quot;name&amp;quot; description=&amp;quot;description&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;!-- Example: the following will produce a text box 3 characters wide with the label &#039;Font size:&#039;.  &lt;br /&gt;
    When the user hovers the mouse over the label, a tooltip will pop up which states &#039;Please enter the &lt;br /&gt;
    required font size&#039;.  On saving, a value entered into the text box will be saved as the &#039;font_size&#039; &lt;br /&gt;
    parameter value. --&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;param type=&amp;quot;text&amp;quot; name=&amp;quot;font_size&amp;quot; size=&amp;quot;3&amp;quot; label=&amp;quot;Font size:&amp;quot; description=&amp;quot;Please enter the required font size&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/code&amp;gt; element can have any name you wish, but there must be one element at the root of the document (this is a requirement for a well-formed XML document). You can have more than one &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; element, but only the first one will be considered.  It is not currently possible to group certain parameter form elements together.&lt;br /&gt;
&lt;br /&gt;
The url parameter specifies a parameter which is added to the URL of the menu item. To enable this functionality, you must create a new class which extends JElement and put it in the administrator/components/com_COMPONENT_NAME directory. More information here: http://forum.joomla.org/viewtopic.php?f=476&amp;amp;t=206062.&lt;br /&gt;
&lt;br /&gt;
So that administrators to access these parameters, you will need to add a button to the toolbar in the Back-end of your component.  This can be done using the code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JToolBarHelper::preferences( &#039;com_COMPONENT_NAME&#039; );&lt;br /&gt;
// e.g. for the core Content component, you would use JToolBarHelper::preferences( &#039;com_content&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which is typically placed in the PHP file responsible for the Back-end output.  (For example, using an MVC structure, you might place this code at the top of &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This adds a &amp;lt;code&amp;gt;Parameters&amp;lt;/code&amp;gt; button to the toolbar:&lt;br /&gt;
&lt;br /&gt;
[[Image:Toolbar_newsfeed.png]]&lt;br /&gt;
&lt;br /&gt;
Clicking on the toolbar button produces a pop-up window containing the form fields for each parameter defined in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that there is no need to define &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; attributes for the &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; elements in the &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file, since the default values will already have been saved in the installation of the Component.&lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
A menu item is associated with a particular view from your Component&#039;s Front-end - following the menu link in the Front-end will display that view.  Joomla! 1.5 allows you to define parameters for a particular view, so that a copy of those parameters can be associated with each menu item using the view.  In addition, you can also choose to override the Component-wide default parameters defined as above, so that the override values will apply to the particular menu item.&lt;br /&gt;
&lt;br /&gt;
The view parameters are defined in an XML file stored in the &#039;&#039;Front-end&#039;&#039; view output template directory.  (This is not to be confused with the site Template directory, which is different!). The XML file has the same name as the layout used with the template. For must applications you will be using the default layout. Thus the path the XML file is something like: &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/components/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.xml&amp;lt;/code&amp;gt;.  The structure of the file is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;state&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;params&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/params&amp;gt;&lt;br /&gt;
    &amp;lt;advanced&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/advanced&amp;gt;&lt;br /&gt;
  &amp;lt;/state&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Standard parameter types]] for a full list of the core parameter types.&lt;br /&gt;
&lt;br /&gt;
Displaying the forms for these parameters is handled automatically by the core &amp;lt;code&amp;gt;com_menus&amp;lt;/code&amp;gt; component, which creates a number of slider panes on the right hand side (at least when viewed using the default Khepri backend site Template) of the menu item edit screen.  Any parameters defined within the &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; tag will appear in the &amp;lt;code&amp;gt;Parameters - Basic&amp;lt;/code&amp;gt; slider pane.  Any parameters defined within the &amp;lt;code&amp;gt;&amp;lt;advanced&amp;gt;&amp;lt;/code&amp;gt; tag will appear in the &amp;lt;code&amp;gt;Parameters - Advanced&amp;lt;/code&amp;gt; slider pane.&lt;br /&gt;
&lt;br /&gt;
The following screenshot shows the menu admin page for the Category &#039;List&#039; layout.  You can see that the &amp;lt;code&amp;gt;Parameters - Basic&amp;lt;/code&amp;gt; slider pane is open, and contains form elements for five parameters.  There are no &#039;Advanced&#039; parameters for this view, and so the &amp;lt;code&amp;gt;Parameters - Advanced&amp;lt;/code&amp;gt; slider pane is not shown:&lt;br /&gt;
&lt;br /&gt;
[[Image:Menu items edit.png]]&lt;br /&gt;
&lt;br /&gt;
For the override of the Component-wide default parameters, &amp;lt;code&amp;gt;com_menus&amp;lt;/code&amp;gt; uses the same &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file as above, so there is no need to define these parameters again.  The override forms are automatically added to a slider pane named &amp;lt;code&amp;gt;Parameters - Component&amp;lt;/code&amp;gt;.  However, there are a number of changes from the forms used in the Preferences pop-up window (despite being based on the same &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file):&lt;br /&gt;
* Any &amp;lt;code&amp;gt;&amp;lt;param type=&amp;quot;radio&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; parameter is shown not as a radio button form field, but by a drop-down list.&lt;br /&gt;
* All drop-down lists (both those defined as such in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt;, and those defined as radio buttons) are given an extra  option.  This extra option displays the text &amp;quot;Use Global&amp;quot; but has an associated value of an empty string.  The &amp;quot;Use Global&amp;quot; option is set as the default option for the list.  Thus, by default, these parameters will use the Component-wide default values, rather than overriding them.  (However, note that any text box fields defined with a default value in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; retain that default value, and so will override the component-wide default value if that is different).&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are defined in an XML file which can be stored anywhere you like, but is typically placed within the &amp;lt;code&amp;gt;models&amp;lt;/code&amp;gt; folder of the Component Back-end (if you are using an MVC structure) and named according to the model to which they apply, i.e. &amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/models/MODEL_NAME.xml&amp;lt;/code&amp;gt;.  The XML file has the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  &amp;lt;params group=&amp;quot;GROUP_NAME&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, you can give the &amp;lt;code&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/code&amp;gt; element whatever name you wish.  You can also have as many &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; groups as you like, though each group must have a &amp;lt;code&amp;gt;group&amp;lt;/code&amp;gt; attribute with a different &amp;lt;code&amp;gt;GROUP_NAME&amp;lt;/code&amp;gt;.  If there are two or more &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; groups with the same &amp;lt;code&amp;gt;GROUP_NAME&amp;lt;/code&amp;gt;, only the last one in the list will be considered.&lt;br /&gt;
&lt;br /&gt;
To display the forms for these parameters in the Back-end of your Component, you will need to do a little work yourself.  Firstly, you need to access the saved parameter data from the database.  For this, you will need to identify both the location of the stored parameters data in the database, and the XML file that you are using to define the parameter form fields.  Assuming that you have already created a &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt; variable to hold your component item (i.e. &#039;article&#039;) data, that the parameters data is stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt;, and that the XML file is located in the models folder as specified above, you could use the following code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$paramsdata = $row-&amp;gt;params;&lt;br /&gt;
$paramsdefs = JPATH_COMPONENT.DS.&#039;models&#039;.DS.&#039;MODEL_NAME.xml&#039;;&lt;br /&gt;
$params = new JParameter( $paramsdata, $paramsdefs );&lt;br /&gt;
&lt;br /&gt;
$this-&amp;gt;assignRef(&#039;params&#039;, $params);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This code is typically placed in the View file (e.g. view.html.php) within the corresponding folder.&lt;br /&gt;
&lt;br /&gt;
To display the parameters forms in slider panes (in the same way that they are displayed in the menu item Back-end), you should use the following code in the template file (e.g. &amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.php&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$pane =&amp;amp; JPane::getInstance( &#039;sliders&#039; );&lt;br /&gt;
&lt;br /&gt;
echo $pane-&amp;gt;startPane( &#039;content-pane&#039; );&lt;br /&gt;
&lt;br /&gt;
// First slider panel&lt;br /&gt;
// Create a slider panel with a title of SLIDER_PANEL_1_TITLE and a title id attribute of SLIDER_PANEL_1_NAME&lt;br /&gt;
echo $pane-&amp;gt;startPanel( JText::_( &#039;SLIDER_PANEL_1_TITLE&#039; ), &#039;SLIDER_PANEL_1_NAME&#039; );&lt;br /&gt;
// Display the parameters defined in the &amp;lt;params&amp;gt; group with no &#039;group&#039; attribute&lt;br /&gt;
echo $this-&amp;gt;params-&amp;gt;render( &#039;params&#039; );&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
&lt;br /&gt;
//Second slider panel&lt;br /&gt;
// Create a slider panel with a title of SLIDER_PANEL_2_TITLE and a title id attribute of SLIDER_PANEL_2_NAME&lt;br /&gt;
echo $pane-&amp;gt;startPanel( JText::_( &#039;SLIDER_PANEL_2_TITLE&#039; ), &#039;SLIDER_PANEL_2_NAME&#039; );&lt;br /&gt;
// Display the parameters defined in the &amp;lt;params&amp;gt; group with the &#039;group&#039; attribute of &#039;GROUP_NAME&#039;&lt;br /&gt;
echo $this-&amp;gt;params-&amp;gt;render( &#039;params&#039;, &#039;GROUP_NAME&#039; );&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
&lt;br /&gt;
// Repeat for each additional slider panel required&lt;br /&gt;
&lt;br /&gt;
echo $pane-&amp;gt;endPane();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
In order to save the parameters to the database you have to overload the bind() function which can be found in &lt;br /&gt;
&amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/com_COMPONENT_NAME/tables/COMPONENT_NAME.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
{&lt;br /&gt;
	if (key_exists( &#039;params&#039;, $array ) &amp;amp;&amp;amp; is_array( $array[&#039;params&#039;] ))&lt;br /&gt;
	{&lt;br /&gt;
		$registry = new JRegistry();&lt;br /&gt;
		$registry-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
		$array[&#039;params&#039;] = $registry-&amp;gt;toString();&lt;br /&gt;
	}&lt;br /&gt;
	return parent::bind($array, $ignore);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessing the parameters - frontend==&lt;br /&gt;
&lt;br /&gt;
The Front-end situation is a bit more complex than the Back-end.  The &#039;standard&#039; way to deal with parameters in the Front-end is to set up a cascade of overrides, as described above:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Item-specific &#039;&#039;overrides&#039;&#039; Menu-specific &#039;&#039;overrides&#039;&#039; Component-default&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
If you &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want to do this, then a little extra work is required&lt;br /&gt;
&lt;br /&gt;
===With overrides===&lt;br /&gt;
&lt;br /&gt;
The following code will access the Component-wide default parameters, &#039;&#039;already overridden&#039;&#039; with those for the menu item (if applicable):&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;
  $params = &amp;amp;JComponentHelper::getParams( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
&lt;br /&gt;
  // e.g. for the com_weblinks component, you would use:&lt;br /&gt;
  // $params = &amp;amp;JComponentHelper::getParams( &#039;com_weblinks&#039; )&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an MVC structure, this code would be placed in the &amp;lt;code&amp;gt;view.html.php&amp;lt;/code&amp;gt; file for the particular view required.&lt;br /&gt;
&lt;br /&gt;
Assuming that the item parameters are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field, and that the particular item has been loaded into the &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt; object by the method, you would then add in the item parameters to the &amp;lt;code&amp;gt;$params&amp;lt;/code&amp;gt; object using:&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;
  $params-&amp;gt;merge( new JParameter( &amp;amp;$row-&amp;gt;params ) );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, in both cases (i.e. overrides by menu-specific parameters, and overrides by item-specific parameters), we aren&#039;t &#039;&#039;just&#039;&#039; doing overrides - we also add in any new parameters that weren&#039;t found in the defaults.  In other words, the &amp;lt;code&amp;gt;$params&amp;lt;/code&amp;gt; object ends up with all the parameters we need!&lt;br /&gt;
&lt;br /&gt;
To access the value of a specific parameter, we would use:&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;
  $params-&amp;gt;get( &#039;PARAMETER_NAME&#039; );&lt;br /&gt;
&lt;br /&gt;
  // e.g. to obtain the value of &#039;parameter1&#039;, we use:&lt;br /&gt;
  // $params-&amp;gt;get( &#039;parameter1&#039; );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to realise that any &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; carried out is persistent, so the following code (where for example you have an array containing the parameters sets for several items, and you want the parameters for each item to individually override the defaults) would not produce the result you might expect:&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;
  foreach ($itemparamsgroup as $itemparams)&lt;br /&gt;
  {&lt;br /&gt;
    $params = &amp;amp;JComponentHelper::getParams( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
    $params-&amp;gt;merge( $itemparams );&lt;br /&gt;
    echo $params-&amp;gt;get( &#039;PARAMETER_NAME&#039; );&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In such cases, you will need to use the non-override method, and then force the overrides manually, as described below.&lt;br /&gt;
&lt;br /&gt;
===Without overrides===&lt;br /&gt;
&lt;br /&gt;
There will be cases where you don&#039;t want to use the default override pattern. For example, you may want to ignore the menu-specific parameters, and have only the item-specific parameters overriding the defaults. This is a little more difficult to accomplish, although it can still be done.&lt;br /&gt;
&lt;br /&gt;
You can access the Component-wide default parameter values, &#039;&#039;without the menu overrides&#039;&#039;, as follows:&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;
  $component = JComponentHelper::getComponent( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
  $params = new JParameter( $component-&amp;gt;params );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to override these with the menu parameters, but &#039;&#039;without&#039;&#039; the &#039;persistence&#039; effect described above, you can:&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;
  $menuitemid = JRequest::getInt( &#039;Itemid&#039; );&lt;br /&gt;
  if ($menuitemid)&lt;br /&gt;
  {&lt;br /&gt;
    $menu = JSite::getMenu();&lt;br /&gt;
    $menuparams = $menu-&amp;gt;getParams( $menuitemid );&lt;br /&gt;
    $params-&amp;gt;merge( $menuparams );&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the item parameters as before, and choose whether to merge them in using the code above, or simply store them in a separate object:&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;
  $itemparams = new JParameter( $row-&amp;gt;params );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can combine this code to achieve the effect that you want.  For example, you could override the Component-wide defaults with the item-specific parameters, but ignore those for the menu.  Or you could use the menu-specific parameters in some circumstances, and the item-specific ones in others.  [Whenever you depart from the standard approach, though, you should be careful that you inform your users how your Component works.  Users will expect your component to work the same way as those from the Joomla! core, so you should have a good reason for departing from this approach.]&lt;br /&gt;
&lt;br /&gt;
Accessing the value of a particular parameter is done in the same way as described above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Development]][[Category:Components]][[Category:Parameters]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JimDeLaHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=15651</id>
		<title>J1.5:Component parameters</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=15651"/>
		<updated>2009-09-19T08:09:15Z</updated>

		<summary type="html">&lt;p&gt;JimDeLaHunt: /* 2. Menu item specific parameters */ Change instructions for xml file name from TEMPLATE_NAME.xml to default.xml&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
One thing that sets Joomla! Components apart from other types of Extension (i.e. Modules and Plugins) is the ability to store significant quantities of data in the Joomla! MySQL database.  Typically, this data will be content for displaying on a page (such as the content of an article, or its title) or data about how that content should be displayed (e.g. a setting specifying whether or not the title should be shown).  A Component normally creates at least one table in the database to store this data - for example, data for articles associated with the &amp;lt;code&amp;gt;com_content&amp;lt;/code&amp;gt; Component are stored in the &amp;lt;code&amp;gt;jos_content&amp;lt;/code&amp;gt; table (where &#039;&#039;jos&#039;&#039; is the table prefix for the site).&lt;br /&gt;
&lt;br /&gt;
However, choosing exactly how to store each item of data requires a little more thought.  There are essentially two choices:  each data item may be stored in its own field, or a collection of data items may be stored within a single parameters field.  (Of course, there is nothing to stop you making use of both methods, for different data items, within the same component).  Which approach you use for a given data item is largely a matter of personal choice, although there are some factors to consider:&lt;br /&gt;
* Core code included in the Joomla! installation makes it very easy to produce the appropriate form elements for entering data into &#039;&#039;&#039;parameters&#039;&#039;&#039; in the Back-end.  If you choose to save the data in separate fields, you will need to code the appropriate form elements yourself.&lt;br /&gt;
* Again, Joomla! core code allows you to set default values for &#039;&#039;&#039;parameters&#039;&#039;&#039; across the whole component.  Individual component items (e.g. individual articles) can then choose to use the default values, or to override them with values specific to that item.  See below for details of how to do this.&lt;br /&gt;
* It is not possible to extract individual parameter values directly from the database.  Instead, the whole parameters field must be extracted and parsed to obtain the different parameter values.  This means that it is not very easy, for example, to run MySQL queries that search for a parameter with a particular value.  Any data that you want to run queries against should be given its &#039;&#039;&#039;own table field&#039;&#039;&#039;.&lt;br /&gt;
* Similarly, it is not possible to run data validation on parameter fields before saving data.&lt;br /&gt;
In general, parameters are conventionally used to store data relating to the &#039;&#039;presentation&#039;&#039; of information.  The information itself is generally stored in separate fields.&lt;br /&gt;
&lt;br /&gt;
==Types of Component parameter==&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These parameters are set once for the whole Component, and are generally used to provide the &#039;default&#039; parameter settings for the Component on that particular site.  &lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
A menu link to an individual Component item (e.g. an article) can also have parameters associated with it, which can affect the way the Component item is displayed &#039;&#039;using that link&#039;&#039;.  The types of parameters available will depend on the way that the Component item is displayed (the &#039;view&#039; in MVC terms, but don&#039;t worry if this doesn&#039;t mean anything to you!).  However, the precise values of those parameters can be set for each menu link individually.  If there is another menu link to that same Component item, then it is important to realise each menu link may have different parameter values, and so the same article may be displayed differently in the two cases.&lt;br /&gt;
&lt;br /&gt;
A menu link can also override the Component-wide default parameters, so that the override values (if set) are used in place of the default values &#039;&#039;for that Component item when accessed via that menu link&#039;&#039;.  As you would expect, when no override value is set, the default value is used instead, in the normal manner.&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
Finally, each Component item (e.g. article) can have parameters which apply to that item, regardless of how it is accessed (i.e. via any available menu link, or even without reference to a menu at all!).  If the Component designer wants, the article specific parameters can also be set up to use the &#039;override&#039; behaviour, so that they default to the current values of the corresponding Component-wide parameters, though this is not essential.  Again, this is described further below.&lt;br /&gt;
&lt;br /&gt;
==Storing the parameters and their values.==&lt;br /&gt;
&lt;br /&gt;
In general, a set of parameters is stored within the database in a single &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; field.  Different parameters are separated by &amp;lt;code&amp;gt;newline&amp;lt;/code&amp;gt; characters (&#039;&amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;&#039; in MySQL - each parameter will appear on a different line when you look at the data in something like phpMyAdmin).  Each parameter consists of the parameter name and value, separated by an equals sign (=).  As an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
parameter1=parameter1value&lt;br /&gt;
parameter2=&lt;br /&gt;
parameter3=parameter3value&lt;br /&gt;
parameter4=parameter4value&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, parameter1, parameter3, and parameter4 have all been assigned values, whilst parameter2 has no value.  Typically, a parameter will be given no value where it is set up to allow override of a default value, but &#039;no override is required&#039; - i.e. it is desired to use the default value.&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the jos_components table, in the row corresponding to the particular component to which they apply.&lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the jos_menu table, in the row corresponding to the particular menu item to which they apply.&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are stored in a text field in the table created by the Component.  Whilst there is no strict rule for naming the field, it is common to extend the above pattern using the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; name.  However, com_content stores article parameters in a field called &amp;lt;code&amp;gt;attribs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Accessing the parameters - Back-end==&lt;br /&gt;
&lt;br /&gt;
Joomla! includes some shortcuts to enable component creators to easily add parameter forms to the Back-end of their component.  These forms allow a site administrator to enter a parameter value by, for example, entering some text in a box, choosing from a drop-down list, or selecting a radio button.  To create these forms, each parameter needs to have an associated &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; object in an XML file.  The type of &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; object determines the form elements that will be shown in the Back-end.  A list of the available form elements is given [[Standard_parameter_types|here]].  More information is given below about the XML file names, structure and location required for each set of parameters.&lt;br /&gt;
&lt;br /&gt;
===1. Component-wide default parameters===&lt;br /&gt;
&lt;br /&gt;
These can be created at installation of the Component, by including &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; elements in the installation XML file (typically called COMPONENT_NAME.xml, and located in the root folder of the Component package.  As far as the parameters are concerned, this XML file has the following structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;install&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;!-- Example: the following will create a line in the parameters field &lt;br /&gt;
    reading &#039;font_size=16\n&#039;: --&amp;gt;&lt;br /&gt;
    &amp;lt;param name=&amp;quot;font_size&amp;quot; default=&amp;quot;16&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/install&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Each &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; element must be given the attributes &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt;, which define the parameter name and value respectively.  These values are then copied to the jos_components table in the database.&lt;br /&gt;
&lt;br /&gt;
However, on its own this is not very useful, as it doesn&#039;t allow users to change the values of the parameters.  To do this, parameter form elements need to be defined in a file named &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; which is located in &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/&amp;lt;/code&amp;gt;.  The file should have the following structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;url addpath=&amp;quot;/administrator/components/com_COMPONENT_NAME/elements&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;param name=&amp;quot;cid&amp;quot; type=&amp;quot;JELEMENT_TYPE_NAME&amp;quot; scope=&amp;quot;com_COMPONENT_NAME&amp;quot; default=&amp;quot;0&amp;quot; label=&amp;quot;LABEL&amp;quot; description=&amp;quot;DESCRIPTION&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;param type=&amp;quot;type&amp;quot; name=&amp;quot;name&amp;quot; description=&amp;quot;description&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;!-- Example: the following will produce a text box 3 characters wide with the label &#039;Font size:&#039;.  &lt;br /&gt;
    When the user hovers the mouse over the label, a tooltip will pop up which states &#039;Please enter the &lt;br /&gt;
    required font size&#039;.  On saving, a value entered into the text box will be saved as the &#039;font_size&#039; &lt;br /&gt;
    parameter value. --&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;param type=&amp;quot;text&amp;quot; name=&amp;quot;font_size&amp;quot; size=&amp;quot;3&amp;quot; label=&amp;quot;Font size:&amp;quot; description=&amp;quot;Please enter the required font size&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/code&amp;gt; element can have any name you wish, but there must be one element at the root of the document (this is a requirement for a well-formed XML document). You can have more than one &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; element, but only the first one will be considered.  It is not currently possible to group certain parameter form elements together.&lt;br /&gt;
&lt;br /&gt;
The url parameter specifies a parameter which is added to the URL of the menu item. To enable this functionality, you must create a new class which extends JElement and put it in the administrator/components/com_COMPONENT_NAME directory. More information here: http://forum.joomla.org/viewtopic.php?f=476&amp;amp;t=206062.&lt;br /&gt;
&lt;br /&gt;
So that administrators to access these parameters, you will need to add a button to the toolbar in the Back-end of your component.  This can be done using the code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JToolBarHelper::preferences( &#039;com_COMPONENT_NAME&#039; );&lt;br /&gt;
// e.g. for the core Content component, you would use JToolBarHelper::preferences( &#039;com_content&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which is typically placed in the PHP file responsible for the Back-end output.  (For example, using an MVC structure, you might place this code at the top of &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This adds a &amp;lt;code&amp;gt;Parameters&amp;lt;/code&amp;gt; button to the toolbar:&lt;br /&gt;
&lt;br /&gt;
[[Image:Toolbar_newsfeed.png]]&lt;br /&gt;
&lt;br /&gt;
Clicking on the toolbar button produces a pop-up window containing the form fields for each parameter defined in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that there is no need to define &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; attributes for the &amp;lt;code&amp;gt;&amp;lt;param /&amp;gt;&amp;lt;/code&amp;gt; elements in the &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file, since the default values will already have been saved in the installation of the Component.&lt;br /&gt;
&lt;br /&gt;
===2. Menu item specific parameters===&lt;br /&gt;
&lt;br /&gt;
A menu item is associated with a particular view from your Component&#039;s Front-end - following the menu link in the Front-end will display that view.  Joomla! 1.5 allows you to define parameters for a particular view, so that a copy of those parameters can be associated with each menu item using the view.  In addition, you can also choose to override the Component-wide default parameters defined as above, so that the override values will apply to the particular menu item.&lt;br /&gt;
&lt;br /&gt;
The view parameters are defined in an XML file stored in the &#039;&#039;Front-end&#039;&#039; view output template (not to be confused with the site Template, which is different!) directory and with the same name as the template, i.e. &amp;lt;code&amp;gt;/PATH_TO_JOOMLA/components/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.xml&amp;lt;/code&amp;gt;.  The structure of the file is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;state&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;params&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/params&amp;gt;&lt;br /&gt;
    &amp;lt;advanced&amp;gt;&lt;br /&gt;
      &amp;lt;param /&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/advanced&amp;gt;&lt;br /&gt;
  &amp;lt;/state&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Standard parameter types]] for a full list of the core parameter types.&lt;br /&gt;
&lt;br /&gt;
Displaying the forms for these parameters is handled automatically by the core &amp;lt;code&amp;gt;com_menus&amp;lt;/code&amp;gt; component, which creates a number of slider panes on the right hand side (at least when viewed using the default Khepri backend site Template) of the menu item edit screen.  Any parameters defined within the &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; tag will appear in the &amp;lt;code&amp;gt;Parameters - Basic&amp;lt;/code&amp;gt; slider pane.  Any parameters defined within the &amp;lt;code&amp;gt;&amp;lt;advanced&amp;gt;&amp;lt;/code&amp;gt; tag will appear in the &amp;lt;code&amp;gt;Parameters - Advanced&amp;lt;/code&amp;gt; slider pane.&lt;br /&gt;
&lt;br /&gt;
The following screenshot shows the menu admin page for the Category &#039;List&#039; layout.  You can see that the &amp;lt;code&amp;gt;Parameters - Basic&amp;lt;/code&amp;gt; slider pane is open, and contains form elements for five parameters.  There are no &#039;Advanced&#039; parameters for this view, and so the &amp;lt;code&amp;gt;Parameters - Advanced&amp;lt;/code&amp;gt; slider pane is not shown:&lt;br /&gt;
&lt;br /&gt;
[[Image:Menu items edit.png]]&lt;br /&gt;
&lt;br /&gt;
For the override of the Component-wide default parameters, &amp;lt;code&amp;gt;com_menus&amp;lt;/code&amp;gt; uses the same &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file as above, so there is no need to define these parameters again.  The override forms are automatically added to a slider pane named &amp;lt;code&amp;gt;Parameters - Component&amp;lt;/code&amp;gt;.  However, there are a number of changes from the forms used in the Preferences pop-up window (despite being based on the same &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; file):&lt;br /&gt;
* Any &amp;lt;code&amp;gt;&amp;lt;param type=&amp;quot;radio&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt; parameter is shown not as a radio button form field, but by a drop-down list.&lt;br /&gt;
* All drop-down lists (both those defined as such in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt;, and those defined as radio buttons) are given an extra  option.  This extra option displays the text &amp;quot;Use Global&amp;quot; but has an associated value of an empty string.  The &amp;quot;Use Global&amp;quot; option is set as the default option for the list.  Thus, by default, these parameters will use the Component-wide default values, rather than overriding them.  (However, note that any text box fields defined with a default value in &amp;lt;code&amp;gt;config.xml&amp;lt;/code&amp;gt; retain that default value, and so will override the component-wide default value if that is different).&lt;br /&gt;
&lt;br /&gt;
===3. &#039;Article&#039; specific parameters===&lt;br /&gt;
&lt;br /&gt;
These are defined in an XML file which can be stored anywhere you like, but is typically placed within the &amp;lt;code&amp;gt;models&amp;lt;/code&amp;gt; folder of the Component Back-end (if you are using an MVC structure) and named according to the model to which they apply, i.e. &amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/components/com_COMPONENT_NAME/models/MODEL_NAME.xml&amp;lt;/code&amp;gt;.  The XML file has the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
  &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  &amp;lt;params group=&amp;quot;GROUP_NAME&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;param /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/params&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, you can give the &amp;lt;code&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/code&amp;gt; element whatever name you wish.  You can also have as many &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; groups as you like, though each group must have a &amp;lt;code&amp;gt;group&amp;lt;/code&amp;gt; attribute with a different &amp;lt;code&amp;gt;GROUP_NAME&amp;lt;/code&amp;gt;.  If there are two or more &amp;lt;code&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/code&amp;gt; groups with the same &amp;lt;code&amp;gt;GROUP_NAME&amp;lt;/code&amp;gt;, only the last one in the list will be considered.&lt;br /&gt;
&lt;br /&gt;
To display the forms for these parameters in the Back-end of your Component, you will need to do a little work yourself.  Firstly, you need to access the saved parameter data from the database.  For this, you will need to identify both the location of the stored parameters data in the database, and the XML file that you are using to define the parameter form fields.  Assuming that you have already created a &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt; variable to hold your component item (i.e. &#039;article&#039;) data, that the parameters data is stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field of the &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt;, and that the XML file is located in the models folder as specified above, you could use the following code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$paramsdata = $row-&amp;gt;params;&lt;br /&gt;
$paramsdefs = JPATH_COMPONENT.DS.&#039;models&#039;.DS.&#039;MODEL_NAME.xml&#039;;&lt;br /&gt;
$params = new JParameter( $paramsdata, $paramsdefs );&lt;br /&gt;
&lt;br /&gt;
$this-&amp;gt;assignRef(&#039;params&#039;, $params);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This code is typically placed in the View file (e.g. view.html.php) within the corresponding folder.&lt;br /&gt;
&lt;br /&gt;
To display the parameters forms in slider panes (in the same way that they are displayed in the menu item Back-end), you should use the following code in the template file (e.g. &amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/com_COMPONENT_NAME/views/VIEW_NAME/tmpl/default.php&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$pane =&amp;amp; JPane::getInstance( &#039;sliders&#039; );&lt;br /&gt;
&lt;br /&gt;
echo $pane-&amp;gt;startPane( &#039;content-pane&#039; );&lt;br /&gt;
&lt;br /&gt;
// First slider panel&lt;br /&gt;
// Create a slider panel with a title of SLIDER_PANEL_1_TITLE and a title id attribute of SLIDER_PANEL_1_NAME&lt;br /&gt;
echo $pane-&amp;gt;startPanel( JText::_( &#039;SLIDER_PANEL_1_TITLE&#039; ), &#039;SLIDER_PANEL_1_NAME&#039; );&lt;br /&gt;
// Display the parameters defined in the &amp;lt;params&amp;gt; group with no &#039;group&#039; attribute&lt;br /&gt;
echo $this-&amp;gt;params-&amp;gt;render( &#039;params&#039; );&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
&lt;br /&gt;
//Second slider panel&lt;br /&gt;
// Create a slider panel with a title of SLIDER_PANEL_2_TITLE and a title id attribute of SLIDER_PANEL_2_NAME&lt;br /&gt;
echo $pane-&amp;gt;startPanel( JText::_( &#039;SLIDER_PANEL_2_TITLE&#039; ), &#039;SLIDER_PANEL_2_NAME&#039; );&lt;br /&gt;
// Display the parameters defined in the &amp;lt;params&amp;gt; group with the &#039;group&#039; attribute of &#039;GROUP_NAME&#039;&lt;br /&gt;
echo $this-&amp;gt;params-&amp;gt;render( &#039;params&#039;, &#039;GROUP_NAME&#039; );&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
&lt;br /&gt;
// Repeat for each additional slider panel required&lt;br /&gt;
&lt;br /&gt;
echo $pane-&amp;gt;endPane();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
In order to save the parameters to the database you have to overload the bind() function which can be found in &lt;br /&gt;
&amp;lt;code&amp;gt;PATH_TO_JOOMLA/administrator/com_COMPONENT_NAME/tables/COMPONENT_NAME.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
{&lt;br /&gt;
	if (key_exists( &#039;params&#039;, $array ) &amp;amp;&amp;amp; is_array( $array[&#039;params&#039;] ))&lt;br /&gt;
	{&lt;br /&gt;
		$registry = new JRegistry();&lt;br /&gt;
		$registry-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
		$array[&#039;params&#039;] = $registry-&amp;gt;toString();&lt;br /&gt;
	}&lt;br /&gt;
	return parent::bind($array, $ignore);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessing the parameters - frontend==&lt;br /&gt;
&lt;br /&gt;
The Front-end situation is a bit more complex than the Back-end.  The &#039;standard&#039; way to deal with parameters in the Front-end is to set up a cascade of overrides, as described above:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Item-specific &#039;&#039;overrides&#039;&#039; Menu-specific &#039;&#039;overrides&#039;&#039; Component-default&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
If you &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want to do this, then a little extra work is required&lt;br /&gt;
&lt;br /&gt;
===With overrides===&lt;br /&gt;
&lt;br /&gt;
The following code will access the Component-wide default parameters, &#039;&#039;already overridden&#039;&#039; with those for the menu item (if applicable):&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;
  $params = &amp;amp;JComponentHelper::getParams( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
&lt;br /&gt;
  // e.g. for the com_weblinks component, you would use:&lt;br /&gt;
  // $params = &amp;amp;JComponentHelper::getParams( &#039;com_weblinks&#039; )&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an MVC structure, this code would be placed in the &amp;lt;code&amp;gt;view.html.php&amp;lt;/code&amp;gt; file for the particular view required.&lt;br /&gt;
&lt;br /&gt;
Assuming that the item parameters are stored in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; field, and that the particular item has been loaded into the &amp;lt;code&amp;gt;$row&amp;lt;/code&amp;gt; object by the method, you would then add in the item parameters to the &amp;lt;code&amp;gt;$params&amp;lt;/code&amp;gt; object using:&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;
  $params-&amp;gt;merge( new JParameter( &amp;amp;$row-&amp;gt;params ) );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, in both cases (i.e. overrides by menu-specific parameters, and overrides by item-specific parameters), we aren&#039;t &#039;&#039;just&#039;&#039; doing overrides - we also add in any new parameters that weren&#039;t found in the defaults.  In other words, the &amp;lt;code&amp;gt;$params&amp;lt;/code&amp;gt; object ends up with all the parameters we need!&lt;br /&gt;
&lt;br /&gt;
To access the value of a specific parameter, we would use:&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;
  $params-&amp;gt;get( &#039;PARAMETER_NAME&#039; );&lt;br /&gt;
&lt;br /&gt;
  // e.g. to obtain the value of &#039;parameter1&#039;, we use:&lt;br /&gt;
  // $params-&amp;gt;get( &#039;parameter1&#039; );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to realise that any &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; carried out is persistent, so the following code (where for example you have an array containing the parameters sets for several items, and you want the parameters for each item to individually override the defaults) would not produce the result you might expect:&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;
  foreach ($itemparamsgroup as $itemparams)&lt;br /&gt;
  {&lt;br /&gt;
    $params = &amp;amp;JComponentHelper::getParams( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
    $params-&amp;gt;merge( $itemparams );&lt;br /&gt;
    echo $params-&amp;gt;get( &#039;PARAMETER_NAME&#039; );&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In such cases, you will need to use the non-override method, and then force the overrides manually, as described below.&lt;br /&gt;
&lt;br /&gt;
===Without overrides===&lt;br /&gt;
&lt;br /&gt;
There will be cases where you don&#039;t want to use the default override pattern. For example, you may want to ignore the menu-specific parameters, and have only the item-specific parameters overriding the defaults. This is a little more difficult to accomplish, although it can still be done.&lt;br /&gt;
&lt;br /&gt;
You can access the Component-wide default parameter values, &#039;&#039;without the menu overrides&#039;&#039;, as follows:&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;
  $component = JComponentHelper::getComponent( &#039;COMPONENT_NAME&#039; );&lt;br /&gt;
  $params = new JParameter( $component-&amp;gt;params );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to override these with the menu parameters, but &#039;&#039;without&#039;&#039; the &#039;persistence&#039; effect described above, you can:&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;
  $menuitemid = JRequest::getInt( &#039;Itemid&#039; );&lt;br /&gt;
  if ($menuitemid)&lt;br /&gt;
  {&lt;br /&gt;
    $menu = JSite::getMenu();&lt;br /&gt;
    $menuparams = $menu-&amp;gt;getParams( $menuitemid );&lt;br /&gt;
    $params-&amp;gt;merge( $menuparams );&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the item parameters as before, and choose whether to merge them in using the code above, or simply store them in a separate object:&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;
  $itemparams = new JParameter( $row-&amp;gt;params );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can combine this code to achieve the effect that you want.  For example, you could override the Component-wide defaults with the item-specific parameters, but ignore those for the menu.  Or you could use the menu-specific parameters in some circumstances, and the item-specific ones in others.  [Whenever you depart from the standard approach, though, you should be careful that you inform your users how your Component works.  Users will expect your component to work the same way as those from the Joomla! core, so you should have a good reason for departing from this approach.]&lt;br /&gt;
&lt;br /&gt;
Accessing the value of a particular parameter is done in the same way as described above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Development]][[Category:Components]][[Category:Parameters]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JimDeLaHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Jdoc_statements&amp;diff=13159</id>
		<title>Jdoc statements</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Jdoc_statements&amp;diff=13159"/>
		<updated>2009-02-10T23:08:19Z</updated>

		<summary type="html">&lt;p&gt;JimDeLaHunt: /* The type attribute */ Note about require double quotes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:jdoc statements}}&lt;br /&gt;
{{jdoc}}&lt;br /&gt;
== jdoc:include ==&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;jdoc:include /&amp;gt;&amp;lt;/code&amp;gt; statement is a Joomla! template&#039;s method of displaying content specific to the page being viewed. There are various &amp;lt;code&amp;gt;&amp;lt;jdoc:include /&amp;gt;&amp;lt;/code&amp;gt; statements, each returning a different part of a Joomla! page.&lt;br /&gt;
&lt;br /&gt;
== The type attribute ==&lt;br /&gt;
The &amp;lt;tt&amp;gt;type&amp;lt;/tt&amp;gt; attribute specifies the type of content to be rendered in place of the &amp;lt;code&amp;gt;&amp;lt;jdoc:include /&amp;gt;&amp;lt;/code&amp;gt; element. For example, the &amp;lt;code&amp;gt;&amp;lt;jdoc:include &#039;&#039;&#039;&#039;&#039;type=&amp;quot;head&amp;quot;&#039;&#039;&#039;&#039;&#039; /&amp;gt;&amp;lt;/code&amp;gt; statement uses the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; attribute &amp;lt;code&amp;gt;head&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;type=&amp;quot;head&amp;quot;&amp;lt;/code&amp;gt;). (&#039;&#039;Note: Jdoc expressions require double quotes around attributes, and won&#039;t work with single quotes.&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
=== Component ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;component&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This element should only appear once in the &amp;lt;body&amp;gt; element of the Template to render the main content of the page with respect to the current page being viewed.&lt;br /&gt;
&lt;br /&gt;
=== Head ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;head&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This element should only appear once in the &amp;lt;head&amp;gt; element of the Template to render the content of the style, script and meta elements associated with the current page.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;installation&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This element is only used within the Joomla! Installer template and of no particular use in a Front-end or Back-end template. It&#039;s somewhat the equivalent to the &#039;component&#039; type, rendering the main content of an installation step.&lt;br /&gt;
&lt;br /&gt;
=== Message ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;message&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This element should only appear once in the &amp;lt;body&amp;gt; element of the Template to render system and error messages that occurred in the request.&lt;br /&gt;
&lt;br /&gt;
CSS styles for system messages can be found in templates\system\css\system.css&lt;br /&gt;
&lt;br /&gt;
=== Module ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;module&amp;quot; name=&amp;quot;breadcrumbs&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;module&amp;quot; name=&amp;quot;menu&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;module&amp;quot; name=&amp;quot;submenu&amp;quot; style=&amp;quot;rounded&amp;quot; id=&amp;quot;submenu-box&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This element renders a single module given by the &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; attribute. The module in question must be published and accessible by the current user in order to become visible. Additional attributes can be provided to control the layout and appearance of the module, if supported.&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Modules are rendered on a page using one of the following code examples. The modules are separated into different areas of a template using template positions set in the &amp;lt;code&amp;gt;templatedetails.xml&amp;lt;/code&amp;gt; file. Using the &amp;lt;code&amp;gt;jdoc:include&amp;lt;/code&amp;gt;&#039;s &amp;lt;code&amp;gt;name=&amp;quot;&#039;&#039;[template position name]&#039;&#039;&amp;quot;&amp;lt;/code&amp;gt; attribute, the various modules in their respective positions can be called, rendered, and styled separately. Additional attributes can be provided to control the layout and appearance of modules, if supported.&lt;br /&gt;
&lt;br /&gt;
Below are some examples of module statements with module positions used frequently by Joomla! theme developers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;debug&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;icon&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;left&amp;quot; style=&amp;quot;rounded&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;left&amp;quot; style=&amp;quot;xhtml&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;right&amp;quot; style=&amp;quot;xhtml&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;status&amp;quot;  /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;syndicate&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;title&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;toolbar&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;top&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;top&amp;quot; style=&amp;quot;xhtml&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;user1&amp;quot; style=&amp;quot;xhtml&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;user2&amp;quot; style=&amp;quot;xhtml&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;user3&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=&amp;quot;user4&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The &amp;lt;code&amp;gt;name=&amp;quot;user3&amp;quot;&amp;lt;/code&amp;gt; module position is normally (by default) used for the top menu.&lt;br /&gt;
&lt;br /&gt;
==== The style attribute ====&lt;br /&gt;
The optional &amp;lt;code&amp;gt;style=&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; attribute is available for the &amp;lt;code&amp;gt;module&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;modules&amp;lt;/code&amp;gt; types of &amp;lt;code&amp;gt;&amp;lt;jdoc:include /&amp;gt;&amp;lt;/code&amp;gt; statements. The attribute value refers to the [[What is module chrome?|chrome]] style used to wrap the output generated by the Module. If no style is provided, a value of &amp;quot;&amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;&amp;quot; is used by default.&lt;br /&gt;
&lt;br /&gt;
Template designers may add additional chrome names as described in [[Applying custom module chrome]].&lt;br /&gt;
[[Category:Templates]]&lt;/div&gt;</summary>
		<author><name>JimDeLaHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Upgrading_your_template_index_file&amp;diff=13158</id>
		<title>J1.5:Upgrading your template index file</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Upgrading_your_template_index_file&amp;diff=13158"/>
		<updated>2009-02-10T23:06:22Z</updated>

		<summary type="html">&lt;p&gt;JimDeLaHunt: Add caution about double quotes in JDoc statements.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Upgrading your index.php file===&lt;br /&gt;
&lt;br /&gt;
# Replace &#039;&#039;&#039;_VALID_MOS&#039;&#039;&#039; with &#039;&#039;&#039;_JEXEC&#039;&#039;&#039;&lt;br /&gt;
# Replace &#039;&#039;&#039;$mosConfig_absolute_path&#039;&#039;&#039; with &#039;&#039;&#039;$this-&amp;gt;baseUrl&#039;&#039;&#039;&lt;br /&gt;
# Replace &#039;&#039;&#039;$mosConfig_live_site&#039;&#039;&#039; with &#039;&#039;&#039;$mainframe-&amp;gt;getCfg( &#039;live_site&#039; )&#039;&#039;&#039;&lt;br /&gt;
# Replace fixed strings with translatable strings.  For example, replace &#039;&#039;&#039;echo &#039;Hello&#039;&#039;&#039;&#039; with &#039;&#039;&#039;echo JText::_( &#039;Hello&#039; )&#039;&#039;&#039;&lt;br /&gt;
# Replace calls to mosGetParam with calls to JRequest::getVar.  For example, replace &#039;&#039;&#039;$id = mosGetParam( $_REQUEST, &#039;id&#039;, 0 );&#039;&#039;&#039; with &#039;&#039;&#039;$id = JRequest::getVar( &#039;id&#039;, 0 );&#039;&#039;&#039;&lt;br /&gt;
# Replace &#039;&#039;&#039;mosShowHead();&#039;&#039;&#039; with &#039;&#039;&#039;&amp;lt;jdoc:include type=&amp;quot;head&amp;quot; /&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
# Replace &#039;&#039;&#039;mosMainBody()&#039;&#039;&#039; with &#039;&#039;&#039;&amp;lt;jdoc:include type=&amp;quot;component&amp;quot; /&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
# Replace &#039;&#039;&#039;mosLoadModules( $position_name, $style );&#039;&#039;&#039; with &#039;&#039;&#039;&amp;lt;jdoc:include type=&amp;quot;modules&amp;quot; name=$position_name style=$style /&amp;gt;&#039;&#039;&#039;. (&#039;&#039;Note: the 1.0 template&#039;s PHP syntax may use single or double quotes. Jdoc expressions require double quotes, and won&#039;t work with single quotes.&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
====Module Chrome/Style Conversion Chart====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Joomla! 1.0&lt;br /&gt;
!Joomla! 1.5&lt;br /&gt;
|-&lt;br /&gt;
| -3&lt;br /&gt;
|rounded&lt;br /&gt;
|-&lt;br /&gt;
| -2&lt;br /&gt;
|xhtml&lt;br /&gt;
|-&lt;br /&gt;
| -1&lt;br /&gt;
|raw&lt;br /&gt;
|-&lt;br /&gt;
|0 or empty&lt;br /&gt;
|table&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Reference]][[Category:Templates]][[Category:Topics]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JimDeLaHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Creating_a_basic_Joomla!_template&amp;diff=13155</id>
		<title>Creating a basic Joomla! template</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Creating_a_basic_Joomla!_template&amp;diff=13155"/>
		<updated>2009-02-10T22:25:43Z</updated>

		<summary type="html">&lt;p&gt;JimDeLaHunt: /* Packaging the template for installation */ new section, not yet broken off into a template.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The purpose of this tutorial is to serve as an introduction to creating Joomla! templates. It will cover the essential files and code needed to create a basic template. The code is presented so it can be cut and pasted with very little modification needed. &lt;br /&gt;
&lt;br /&gt;
== Setting up a directory structure ==&lt;br /&gt;
{{:Setting up a directory structure|Setting up a directory structure}}&lt;br /&gt;
{{:How to edit the files|How to edit the files}}&lt;br /&gt;
== Creating a basic templateDetails.xml file ==&lt;br /&gt;
{{:Creating a basic templateDetails.xml file}}&lt;br /&gt;
&lt;br /&gt;
== Creating a basic index.php file ==&lt;br /&gt;
{{:Creating a basic index file}}&lt;br /&gt;
{{:Testing the template}}&lt;br /&gt;
&lt;br /&gt;
== Packaging the template for installation ==&lt;br /&gt;
&lt;br /&gt;
A directory with several loose files is not a convenient package for distribution. So the final step is to make a &#039;&#039;package&#039;&#039;. This is a compressed archive containing the directory structure and all the files. The package can be in &#039;&#039;&#039;ZIP&#039;&#039;&#039; format (with a &amp;lt;tt&amp;gt;.zip&amp;lt;/tt&amp;gt; extension), in &#039;&#039;&#039;TAR-gzip&#039;&#039;&#039; format (with a &amp;lt;tt&amp;gt;.tar.gz&amp;lt;/tt&amp;gt; extension), or in &#039;&#039;&#039;TAR-bz2&#039;&#039;&#039; format (with a &amp;lt;tt&amp;gt;.tar.bz2&amp;lt;/tt&amp;gt; extension). &lt;br /&gt;
&lt;br /&gt;
If your template is in a directory &amp;lt;tt&amp;gt;mytemplate/&amp;lt;/tt&amp;gt; then to make the package you can connect to that directory and use commands like:&lt;br /&gt;
* &amp;lt;tt&amp;gt;tar cvvzf ../mytemplate.tar.gz *&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;zip -a -r ..\mytemplate.zip *.*&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note to template developers using Mac OS X systems: the Finder&#039;s &amp;quot;compress&amp;quot; menu item produces a usable ZIP format package, but with one catch. It stores the files in [[AppleDouble]] format, adding extra files with names beginning with &amp;quot;&amp;lt;tt&amp;gt;._&amp;lt;/tt&amp;gt;&amp;quot;. Thus it adds a file named &amp;quot;&amp;lt;tt&amp;gt;._templateDetails.xml&amp;lt;/tt&amp;gt;, which Joomla 1.5.x can sometimes misinterpret. The symptom is an error message, &amp;quot;XML Parsing Error at 1:1. Error 4: Empty document&amp;quot;. The workaround is to compress from the command line, and set a shell environment variable &amp;quot;COPYFILE_DISABLE&amp;quot; to &amp;quot;true&amp;quot; before using &amp;quot;compress&amp;quot; or &amp;quot;tar&amp;quot;. See the [[AppleDouble]] article for more information.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
You should now have created a template that works. It won&#039;t look like much yet. The best thing to do now is start experimenting with the layout.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Templates]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>JimDeLaHunt</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=User:JimDeLaHunt&amp;diff=13154</id>
		<title>User:JimDeLaHunt</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=User:JimDeLaHunt&amp;diff=13154"/>
		<updated>2009-02-10T21:59:15Z</updated>

		<summary type="html">&lt;p&gt;JimDeLaHunt: Stub content.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Jim DeLaHunt, [http://jdlh.com/ consultant in multilingual websites], blog at http://blog.jdlh.com/ . Based in Vancouver, Canada.&lt;br /&gt;
&lt;br /&gt;
Part of my practice is helping with extension development and administration of Joomla sites.  I specialise in [http://jdlh.com multilingual Joomla] sites.&lt;/div&gt;</summary>
		<author><name>JimDeLaHunt</name></author>
	</entry>
</feed>