<?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=Darkick</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=Darkick"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Darkick"/>
	<updated>2026-06-20T00:28:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Component_parameters&amp;diff=14928</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=14928"/>
		<updated>2009-07-15T09:33:20Z</updated>

		<summary type="html">&lt;p&gt;Darkick: /* Storing the parameters and their values. */&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/TEMPLATE_NAME.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( &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>Darkick</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Coding_style_and_standards&amp;diff=14924</id>
		<title>Coding style and standards</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Coding_style_and_standards&amp;diff=14924"/>
		<updated>2009-07-14T09:30:51Z</updated>

		<summary type="html">&lt;p&gt;Darkick: /* Function Definitions */  Removed spaces in definition of the fooFunction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{review}}&lt;br /&gt;
{{RightTOC}}&lt;br /&gt;
remark: The following information has been copied from the old WIKI archive has not yet been reviewed.&lt;br /&gt;
See: http://dev.joomla.org/component/option,com_jd-wiki/Itemid,/id,standards:coding/&lt;br /&gt;
&lt;br /&gt;
Good coding standards are important in any development project, but particularly when multiple developers are working on the same project. Having coding standards helps ensure that the code is of high quality, has fewer bugs, and is easily maintained.&lt;br /&gt;
&lt;br /&gt;
First rule, if in doubt, ask.&lt;br /&gt;
&lt;br /&gt;
== File Format ==&lt;br /&gt;
All files contributed to Joomla must:&lt;br /&gt;
&lt;br /&gt;
* Be stored as ASCII text&lt;br /&gt;
* Use UTF-8 character encoding&lt;br /&gt;
* Be Unix formatted&lt;br /&gt;
** Lines must end only with a line feed (LF). Line feeds are represented as ordinal 10, octal 012 and hex 0A. Do not use carriage returns (CR) like Macintosh computers do or the carriage return/line feed combination (CRLF) like Windows computers do.&lt;br /&gt;
&lt;br /&gt;
== Coding Standards ==&lt;br /&gt;
&lt;br /&gt;
=== Spelling ===&lt;br /&gt;
&lt;br /&gt;
Spelling of class, function, variable and constant names should generally be in accordance with British English rules (en_GB).  However, some exceptions are permitted, for example where common programming names are used that align with the PHP API such as &amp;lt;code&amp;gt;$color&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== E_STRICT-compatible code ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.6, all new code that is suggested for inclusion into Joomla must be E_STRICT-compatible. This means that it must not produce any warnings or errors when PHP&#039;s error reporting level is set to E_ALL | E_STRICT.&lt;br /&gt;
&lt;br /&gt;
=== Indenting and Line Length ===&lt;br /&gt;
&lt;br /&gt;
Use tabs to indent, not spaces. Make sure that the tab-stops are set to only 4 spaces in length.&lt;br /&gt;
&lt;br /&gt;
There is no set limit for line length.  Use your judgement based on the nature of the line and readability.&lt;br /&gt;
&lt;br /&gt;
=== Control Structures ===&lt;br /&gt;
&lt;br /&gt;
These include if, for, while, switch, etc. Here is an example of an if statement, as it is the most complicated of the control structures:&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;
if ((condition1) || (condition2)) {&lt;br /&gt;
    action1();&lt;br /&gt;
} else if ((condition3) &amp;amp;&amp;amp; (condition4)) {&lt;br /&gt;
    action2();&lt;br /&gt;
} else&lt;br /&gt;
{&lt;br /&gt;
   // Use one true brace in control structures&lt;br /&gt;
   // when the block is longer than one line&lt;br /&gt;
    defaultAction();&lt;br /&gt;
    anotherAction();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// optional formatting if it improves readability&lt;br /&gt;
if ((condition1) || (condition2)) {&lt;br /&gt;
    action1();&lt;br /&gt;
}&lt;br /&gt;
else if ((condition3) &amp;amp;&amp;amp; (condition4)) {&lt;br /&gt;
    action2();&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
    defaultAction();&lt;br /&gt;
    anotherAction();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Control statements should have one space between the control keyword and opening parenthesis, to distinguish them from function calls.&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;layouts&#039;&#039;&#039;, the alternative named notation should be used:&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;
if ((condition1) OR (condition2)) :&lt;br /&gt;
    action1();&lt;br /&gt;
elseif ((condition3) AND (condition4)) :&lt;br /&gt;
    action2();&lt;br /&gt;
else :&lt;br /&gt;
    defaultAction();&lt;br /&gt;
    anotherAction();&lt;br /&gt;
endif;&lt;br /&gt;
&lt;br /&gt;
foreach ($array as $element) :&lt;br /&gt;
    echo $element;&lt;br /&gt;
endforeach;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logical operators in condition statements should use uppercase words (&amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt;, etc) rather than programmatic notation (&amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;, etc).&lt;br /&gt;
&lt;br /&gt;
With the exception of &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt; statements, curly braces must always be included even though they are technically optional. Having them increases readability and decreases the likelihood of logic errors being introduced when new lines are added.&lt;br /&gt;
&lt;br /&gt;
For switch statements:&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;
switch (condition)&lt;br /&gt;
{&lt;br /&gt;
    case 1:&lt;br /&gt;
        doAction1();&lt;br /&gt;
        break;&lt;br /&gt;
&lt;br /&gt;
    case 2:&lt;br /&gt;
        doAction2();&lt;br /&gt;
        break;&lt;br /&gt;
&lt;br /&gt;
    default:&lt;br /&gt;
        doDefaultAction();&lt;br /&gt;
        break;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use indenting and line-breaks rather than curly braces in the &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt; statements to increase readability.  There should be no space between the condition and the colon in the &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt; statement.&lt;br /&gt;
&lt;br /&gt;
=== Function Calls ===&lt;br /&gt;
&lt;br /&gt;
Functions should be called with no spaces between the function name and the opening parenthesis, and no space between this and the first parameter; a space after the comma between each parameter (if they are present), and no space between the last parameter and the closing parenthesis, and the semicolon. Here&#039;s an example:&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;
$var = foo($bar, $baz, $quux);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As displayed above, there should be space before and one space after the equals sign used to assign the return value of a function to a variable. In the case of a block of related assignments, tabs (not spaces) may be inserted to promote readability:&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;
$short          = foo($bar);&lt;br /&gt;
$long_variable  = foo($baz);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Function Definitions ===&lt;br /&gt;
&lt;br /&gt;
Class and function declarations follow the &amp;quot;one true brace&amp;quot; convention:&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;
function fooFunction($arg1, $arg2 = &#039;&#039;)&lt;br /&gt;
{&lt;br /&gt;
    if (condition) {&lt;br /&gt;
        statement;&lt;br /&gt;
    }&lt;br /&gt;
    return $val;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class fooClass&lt;br /&gt;
{&lt;br /&gt;
    function fooMethod($arg1)&lt;br /&gt;
    {&lt;br /&gt;
        if ($arg) {&lt;br /&gt;
            $result = true;&lt;br /&gt;
        } else {&lt;br /&gt;
            $result = false;&lt;br /&gt;
        }&lt;br /&gt;
        return $result;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments with default values go at the end of the argument list. Always attempt to return a meaningful value from a function if one is appropriate. Here is a slightly longer example:&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;
function connect(&amp;amp;$dsn, $persistent = false)&lt;br /&gt;
{&lt;br /&gt;
    if (is_array($dsn)) {&lt;br /&gt;
        $dsninfo = &amp;amp;$dsn;&lt;br /&gt;
    } else {&lt;br /&gt;
        $dsninfo = DB::parseDSN($dsn);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (!$dsninfo OR !$dsninfo[&#039;phptype&#039;]) {&lt;br /&gt;
        return $this-&amp;gt;raiseError();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Inline documentation for classes should follow the PHPDoc convention, similar to Javadoc. More information about PHPDoc can be found here: http://www.phpdoc.org/&lt;br /&gt;
&lt;br /&gt;
See also [[Adding phpDocumentor comments]]&lt;br /&gt;
&lt;br /&gt;
Non-documentation comments are strongly encouraged. A general rule of thumb is that if you look at a section of code and think &amp;quot;Wow, I don&#039;t want to try and describe that&amp;quot;, you need to comment it before you forget how it works.&lt;br /&gt;
&lt;br /&gt;
C style comments (&amp;lt;tt&amp;gt;/* */&amp;lt;/tt&amp;gt;) and standard C++ comments (&amp;lt;tt&amp;gt;//&amp;lt;/tt&amp;gt;) are both satisfactory. Use of Perl/shell style comments (&amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt;) is not permitted.&lt;br /&gt;
&lt;br /&gt;
Please note - commented code is not to be committed to trunk or release repositories.&lt;br /&gt;
&lt;br /&gt;
=== Including Code ===&lt;br /&gt;
&lt;br /&gt;
Anywhere you are unconditionally including a class file, use &amp;lt;code&amp;gt;require_once&amp;lt;/code&amp;gt;. Anywhere you are conditionally including a class file (for example, factory methods), use &amp;lt;code&amp;gt;include_once&amp;lt;/code&amp;gt;. Either of these will ensure that class files are included only once. They share the same file list, so you don&#039;t need to worry about mixing them -- a file included with &amp;lt;code&amp;gt;require_once&amp;lt;/code&amp;gt; will not be included again by &amp;lt;/code&amp;gt;include_once&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;Note: [[php:include_once|include_once]] and [[php:require_once|require_once]] are PHP &#039;&#039;language statements&#039;&#039;, not functions. You don&#039;t need parentheses around the filename to be included.&lt;br /&gt;
&lt;br /&gt;
=== PHP Code Tags ===&lt;br /&gt;
&lt;br /&gt;
Always use &amp;lt;tt&amp;gt;&amp;amp;lt;?php ?&amp;gt;&amp;lt;/tt&amp;gt; to delimit PHP code, not the &amp;lt;tt&amp;gt;&amp;amp;lt;? ?&amp;gt;&amp;lt;/tt&amp;gt; shorthand. This is the most portable way to include PHP code on differing operating systems and setups.&lt;br /&gt;
&lt;br /&gt;
For files that contain only PHP code, the closing tag (&amp;lt;tt&amp;gt;?&amp;gt;&amp;lt;/tt&amp;gt;) is never permitted. It is not required by PHP. Not including it prevents trailing whitespace from being accidentally injected into the output (see PHP manual on [http://au.php.net/basic-syntax.instruction-separation instruction separation]).&lt;br /&gt;
&lt;br /&gt;
=== SQL Queries ===&lt;br /&gt;
&lt;br /&gt;
SQL keywords are to be written in uppercase, while all other identifiers (which the exception of quoted text obviously) is to be in lowercase. Carriage returns should not be used as [[JDatabase]]::getQuery provides for formatted output.  However, indenting with spaces to improve readability is desireable.&lt;br /&gt;
&lt;br /&gt;
Queries should be wrapped in single quotes (as these text blocks are parsed faster by php).&lt;br /&gt;
&lt;br /&gt;
All quoted string must using the &#039;&#039;Quote&#039;&#039; method to facilitate future compatibility with other database engines.&lt;br /&gt;
&lt;br /&gt;
All table names should use the &#039;&#039;&#039;&amp;lt;tt&amp;gt;#_&amp;lt;/tt&amp;gt;&#039;&#039;&#039; prefix rather than &amp;lt;tt&amp;gt;jos_&amp;lt;/tt&amp;gt; to access Joomla! contents and allow for the [[screen.config.15#Database_Settings|user defined database prefix]] to be applied.&lt;br /&gt;
&lt;br /&gt;
All expected integer or floating-point variable must be [http://php.net/manual/language.types.type-juggling.php cast] with &amp;lt;tt&amp;gt;(int)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;(float)&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;(double)&amp;lt;/tt&amp;gt; as appropriate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$state = 1;&lt;br /&gt;
$name  = &#039;bill&#039;;&lt;br /&gt;
$db    = &amp;amp;JFactory::getDBO();&lt;br /&gt;
$query = &#039;SELECT COUNT( c.id ) AS num_articles, u.id, u.username&#039;.&lt;br /&gt;
    &#039; FROM #__content AS c&#039;.&lt;br /&gt;
    &#039; LEFT JOIN #__users AS u ON u.id = c.created_by&#039;.&lt;br /&gt;
    &#039; WHERE c.state = &#039;.(int) $state&lt;br /&gt;
    &#039;  AND u.id IS NOT NULL&#039;.&lt;br /&gt;
    &#039;  AND u.username &amp;lt;&amp;gt; &#039;.$db-&amp;gt;Quote( $name ).&lt;br /&gt;
    &#039; GROUP BY u.id&#039;.&lt;br /&gt;
    &#039;  HAVING COUNT( c.id ) &amp;gt; 0&#039;;&lt;br /&gt;
$db-&amp;gt;setQuery();&lt;br /&gt;
// Output formated query:&lt;br /&gt;
if ($debug) {&lt;br /&gt;
    echo $db-&amp;gt;getQuery();&lt;br /&gt;
}&lt;br /&gt;
$stats = $db-&amp;gt;loadObjectList();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Doc Blocks ===&lt;br /&gt;
&lt;br /&gt;
All source code files in the core Joomla distribution must contain the following comment block as the header:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @version	$Id$&lt;br /&gt;
 * @package	Joomla&lt;br /&gt;
 * @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.&lt;br /&gt;
 * @license	GNU/GPL, see LICENSE.php&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;@package&amp;lt;/code&amp;gt; in the header is not required for class-only files.&lt;br /&gt;
&lt;br /&gt;
Classes, functions, constants, class properties and class methods should all be supplied with appropriate DocBlocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Short description for class&lt;br /&gt;
 *&lt;br /&gt;
 * Long description for class (if any)...&lt;br /&gt;
 *&lt;br /&gt;
 * @package    PackageName&lt;br /&gt;
 * @subpackage SubPackageName&lt;br /&gt;
 * @link       http://pear.php.net/package/PackageName&lt;br /&gt;
 * @see        NetOther, Net_Sample::Net_Sample()&lt;br /&gt;
 * @since      Class available since Release 1.2.0&lt;br /&gt;
 * @deprecated Class deprecated in Release 2.0.0&lt;br /&gt;
 */&lt;br /&gt;
class JFooBar&lt;br /&gt;
{&lt;br /&gt;
    /**&lt;br /&gt;
     * @var int $id Primary key&lt;br /&gt;
     */&lt;br /&gt;
    public $id = null;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following package names are to be used in the core stack:&lt;br /&gt;
&lt;br /&gt;
* Joomla.Administrator - all files that belong only to the administrator or backend application&lt;br /&gt;
* Joomla.Installation - all files that belong to the installation application&lt;br /&gt;
* Joomla.Plugin - all plugin files&lt;br /&gt;
* Joomla.Site - all files that pertain only to the site or frontend application&lt;br /&gt;
* Joomla.XML-RPC - all files that belong to the XML-RPC server application&lt;br /&gt;
&lt;br /&gt;
The sub-package name will vary according to the extension type:&lt;br /&gt;
&lt;br /&gt;
* Components - the component folder, eg &amp;lt;code&amp;gt;com_content&amp;lt;/code&amp;gt;&lt;br /&gt;
* Modules - the module folder, eg &amp;lt;code&amp;gt;mod_latest_news&amp;lt;/code&amp;gt;&lt;br /&gt;
* Plugins - the folder.element, eg &amp;lt;code&amp;gt;content.pagebreak&amp;lt;/code&amp;gt;&lt;br /&gt;
* Templates - the template folder, eg &amp;lt;code&amp;gt;rhuk_milkyway&amp;lt;/code&amp;gt;&lt;br /&gt;
* Framework - nothing for top level files (such as &amp;lt;code&amp;gt;factory.php&amp;lt;/code&amp;gt;), the first level folder or the first.second level folders as appropriate, eg &amp;lt;code&amp;gt;utilities&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;joomla/utitilies/date.php&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;html.html&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;joomla/html/html/email.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that code contributed to the Joomla stack that will become the copyright of the project is not allowed to include &amp;lt;code&amp;gt;@author&amp;lt;/code&amp;gt; tags.  You should update the contribution log in &amp;lt;tt&amp;gt;CREDITS.php&amp;lt;/tt&amp;gt;.  Joomla&#039;s philosophy is that the code is written &amp;quot;all together&amp;quot; and there is no notion of any one person &#039;owning&#039; any sectino of code.&lt;br /&gt;
&lt;br /&gt;
Files included from third party sources must leave DocBlocks intact.&lt;br /&gt;
&lt;br /&gt;
Layout files do not need full DocBlocks.  However, they do require and Id tag and direct access block as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;?php /** $Id$ */ defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;); ?&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
&lt;br /&gt;
Classes should be given descriptive names. Avoid using abbreviations where possible. Class names should always begin with an uppercase letter and be written in CamelCase even if using tradationally uppercase acryonyms (such as XML, HTML).  One exception is for Joomla framework classes which must begin with an uppercase &#039;J&#039; with the next letter also being uppercase.  For example:&lt;br /&gt;
&lt;br /&gt;
* JHtmlHelper&lt;br /&gt;
* JXmlParser&lt;br /&gt;
* JModel&lt;br /&gt;
&lt;br /&gt;
Third-party developers are advised to namespace their functions with a unique prefix.&lt;br /&gt;
&lt;br /&gt;
=== Functions and Methods ===&lt;br /&gt;
&lt;br /&gt;
Functions and methods should be named using the &amp;quot;studly caps&amp;quot; style (also referred to as &amp;quot;bumpy case&amp;quot; or &amp;quot;camel caps&amp;quot;). The initial letter of the name is lowercase, and each letter that starts a new &amp;quot;word&amp;quot; is capitalized. Function in the Joomla framework must begin with a lowercase &#039;j&#039;.  Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
connect();&lt;br /&gt;
getData();&lt;br /&gt;
buildSomeWidget();&lt;br /&gt;
jImport();&lt;br /&gt;
jDoSomething();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Private class members (meaning class members that are intended to be used only from within the same class in which they are declared; are preceded by a single underscore. Properties are to be written in underscore format (that is, logical words separated by underscores) and should be all lowercase.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class JFooBar&lt;br /&gt;
{&lt;br /&gt;
    // Joomla 1.5 and earlier format&lt;br /&gt;
    var $_status = null;&lt;br /&gt;
&lt;br /&gt;
    function _sort()&lt;br /&gt;
    {&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Joomla 1.6 format&lt;br /&gt;
    private $_status = null;&lt;br /&gt;
&lt;br /&gt;
    protected $field_name = null;&lt;br /&gt;
&lt;br /&gt;
    protected function _sort()&lt;br /&gt;
    {&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Constants should always be all-uppercase, with underscores to separate words. Prefix constant names with the uppercased name of the class/package they are used in. For example, the constants used by the [[JError]] class all begin with &amp;quot;JERROR_&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Global Variables ===&lt;br /&gt;
&lt;br /&gt;
If your package needs to define global variables, their name should start with a single underscore followed by the uppsercase class/package name and another underscore. For example, the JError class uses a global variable called $_JERROR_LEVELS.&lt;br /&gt;
&lt;br /&gt;
With PHP5 and later you may use static class properties or constants instead of globals.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
class JWhatever&lt;br /&gt;
{&lt;br /&gt;
    public static $instance = null;&lt;br /&gt;
    const SUCCESS = 1;&lt;br /&gt;
    const FAILURE = 0;&lt;br /&gt;
    // Methods...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regular and Class Variables ===&lt;br /&gt;
&lt;br /&gt;
Regular variables, follow the same conventions as function.&lt;br /&gt;
&lt;br /&gt;
Class variables should be set to null or some other appropriate default value. Lining up the default values with tabs should only be used if particularly warranted for readability.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
When using references, there should be a space before the reference operator and no space between it and the function or variable name.  For example:&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;
$ref1  = &amp;amp;$this-&amp;gt;_sql;&lt;br /&gt;
$db    = &amp;amp;JFactory::getDBO();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Language Keys ===&lt;br /&gt;
&lt;br /&gt;
Except for the most common of words, such as &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;, &amp;quot;Show&amp;quot;, &amp;quot;Hide&amp;quot; all language keys should be namespaced to reflect the type of string they represent.  Always consider that if two extensions use the same key, the one loaded last will be the one that displays.  Namespacing should generally relate to the extension displaying the text. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;?php&lt;br /&gt;
echo JText::_(&#039;Weblink Link&#039;);&lt;br /&gt;
echo JText::_(&#039;Weblink Title&#039;);&lt;br /&gt;
echo JText::_(&#039;Weblink Description&#039;);&lt;br /&gt;
&lt;br /&gt;
echo JText::_(&#039;Exception An error occurred while saving&#039;);&lt;br /&gt;
?&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TODO: Link to page with &amp;quot;common&amp;quot; strings that can be used for typical actions in components, such a &amp;quot;Save&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Where the same English word is used in two different locations, two different language keys should be used to allow for cases where the translation results in different words or phrases.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// A table column title&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;?php echo JText::_(&#039;Weblink Column Title&#039;);?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;?php echo JText::_(&#039;Weblink Column Link&#039;);?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// In the form&lt;br /&gt;
&amp;lt;?php echo JText::_(&#039;Weblink Title&#039;);?&amp;gt;&amp;lt;input name=&amp;quot;title&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;?php echo JText::_(&#039;Weblink Link&#039;);?&amp;gt;&amp;lt;input name=&amp;quot;link&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Toolbar and Linkbar text should be prefixed Toolbar and Linkbar respectively.&lt;br /&gt;
&lt;br /&gt;
The language keys should be written as naturally as possible with spaces, not underscores separating words.  Long phrases can be condensed to reduce keys to a sensible length.  For example, tooltips for an edit field can be written like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php echo JText::_(&#039;Weblink Title&#039;);?&amp;gt;&amp;lt;input name=&amp;quot;title&amp;quot; title=&amp;quot;&amp;lt;?php echo JText::_(&#039;Weblink Title Desc&#039;);?&amp;gt;&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The convention used should be governed by common sense, but must be consistent.  In general consider how the language file will look with all keys sorted alphabetically.  Prefixes should be used to group text within a common context (such as column headings).  Suffixes should be used to group elements that logically go together (such as a field name and its description).&lt;br /&gt;
&lt;br /&gt;
Phrases must never be assembled by string concatenation. Each phrase must be represented by a single language key, using sprintf as appropriate to replace dynamic words in the phrase.  Where replacements are made, the word used should be as descriptive as possible and all-uppercase.  This assists the translators to determine the context of the replacement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;?php&lt;br /&gt;
// Not permitted&lt;br /&gt;
echo JText::_(&#039;Deleted &#039;).$n.JText::_(&#039; items&#039;);&lt;br /&gt;
&lt;br /&gt;
// Permitted&lt;br /&gt;
echo JText::sprintf(&#039;Message Deleted NUMBER items&#039;, $n);&lt;br /&gt;
?&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reference in the language file would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;MESSAGE DELETED NUMBER ITEMS=Deleted %d Item(s)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If more than one dynamic string is used in a phrase, the printf markers should employ order placement as other languages might change the position of the strings. This is done via %[number]$[printf_type] as follows:&lt;br /&gt;
&lt;br /&gt;
Left to right language:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;PAGE X OF Y=Page %1$d of %2$d&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Right to left language:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;PAGE X OF Y=%2$d of %1$d egaP&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
&lt;br /&gt;
For single controller components, the naming convention is &#039;&#039;[Name]Controller&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Content Controller&lt;br /&gt;
 * @package Joomla&lt;br /&gt;
 */&lt;br /&gt;
class ContentController extends JController&lt;br /&gt;
{&lt;br /&gt;
    // Methods&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The file name will generally be &#039;&#039;controller.php&#039;&#039; and is located in the component folder.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
com_content&lt;br /&gt;
 / controller.php&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a multi-controller components, such as the Banners in the Administrator, the convention is &#039;&#039;[Component]Controller[Name]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Banner Client Controller&lt;br /&gt;
 * @package Joomla&lt;br /&gt;
 */&lt;br /&gt;
class BannerControllerClient extends JController&lt;br /&gt;
{&lt;br /&gt;
    // Methods&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files will be located in a &amp;lt;tt&amp;gt;/controllers/&amp;lt;/tt&amp;gt; folder under the component folder.  The file names will reflect the name of the controller.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
com_banner&lt;br /&gt;
  /controllers/&lt;br /&gt;
    / banner.php&lt;br /&gt;
    / client.php&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Models===&lt;br /&gt;
&lt;br /&gt;
The naming convention is &#039;&#039;[Component]Model[Name]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Banner Client Model&lt;br /&gt;
 * @package Joomla&lt;br /&gt;
 */&lt;br /&gt;
class BannerModelClient extends JModel&lt;br /&gt;
{&lt;br /&gt;
    // Methods&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files will be located in a &amp;lt;tt&amp;gt;/models/&amp;lt;/tt&amp;gt; folder under the component folder.  The file names will reflect the name of the model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
com_banner&lt;br /&gt;
  /models/&lt;br /&gt;
    / banner.php&lt;br /&gt;
    / client.php&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
The naming convention is &#039;&#039;[Component]View[Name]&#039;&#039;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Contact Category View&lt;br /&gt;
 * @package Joomla&lt;br /&gt;
 */&lt;br /&gt;
class ContactViewCategory extends JView&lt;br /&gt;
{&lt;br /&gt;
    // Methods&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The files will be located in a &amp;lt;tt&amp;gt;/view/&amp;lt;/tt&amp;gt; folder under the component folder. The subfolder names will reflect the name of a View.&lt;br /&gt;
&lt;br /&gt;
 com_contact&lt;br /&gt;
  /views/&lt;br /&gt;
    /&#039;&#039;view name 1&#039;&#039;/&lt;br /&gt;
      / view.html.php&lt;br /&gt;
    /&#039;&#039;view name 2&#039;&#039;/&lt;br /&gt;
      / view.html.php&lt;br /&gt;
&lt;br /&gt;
Multi-view components such as com_content may provide an optional &amp;quot;master&amp;quot; view class the specialised views extend from. It is located in the component folder and typically called &#039;&#039;view.php&#039;&#039;. The naming convention is &#039;&#039;[Component]View&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 com_content&lt;br /&gt;
  /views/&lt;br /&gt;
     &amp;lt;span style=&amp;quot;color:#999&amp;quot;&amp;gt;/archive/&amp;lt;/span&amp;gt;&lt;br /&gt;
       / view.html.php&lt;br /&gt;
     &amp;lt;span style=&amp;quot;color:#999&amp;quot;&amp;gt;/article/&amp;lt;/span&amp;gt;&lt;br /&gt;
  / view.php&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
view.php&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Content View&lt;br /&gt;
 * @package Joomla&lt;br /&gt;
 */&lt;br /&gt;
class ContentView extends JView&lt;br /&gt;
{&lt;br /&gt;
    // Helper Methods&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/archive/view.html.php&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * Content Archive View&lt;br /&gt;
 * @package Joomla&lt;br /&gt;
 */&lt;br /&gt;
class ContactViewArchive extends ContentView&lt;br /&gt;
{&lt;br /&gt;
    // Methods&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Plugins ===&lt;br /&gt;
&lt;br /&gt;
The naming convention is &#039;&#039;[Folder]Plugin[Element]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class ContentPluginPagebreak extends JPlugin&lt;br /&gt;
{&lt;br /&gt;
    // Methods&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Layouts ===&lt;br /&gt;
Components may support different Layouts to render the data supplied by a [[#Views|View]] and its [[#Models|Models]]. A Layout file usually contains markup and some PHP code for &#039;&#039;display logic only&#039;&#039;: no functions, no classes.&lt;br /&gt;
&lt;br /&gt;
A Layout consists of at least one .php file and an equally named [[Creating a basic layout.xml file|.xml manifest file]] located in the &amp;lt;tt&amp;gt;/tmpl/&amp;lt;/tt&amp;gt; folder of a View, both reflect the internal name of the Layout. The standard Layout is called &#039;&#039;default&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#999&amp;quot;&amp;gt;com_content&lt;br /&gt;
   /views/&lt;br /&gt;
     /article/&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#000&amp;quot;&amp;gt;&lt;br /&gt;
       /tmpl/&lt;br /&gt;
         / default.php&lt;br /&gt;
         / default.xml&lt;br /&gt;
         / form.php&lt;br /&gt;
         / form.xml&lt;br /&gt;
         / pagebreak.php&lt;br /&gt;
         / pagebreak.xml &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Layout may use supplemental .php files to provide more granual control in order to render individual parts or repetitive items of the data.&lt;br /&gt;
&lt;br /&gt;
Users may customise the Layout output via [[#Template Layout Overrides|Template Layout Overrides]].&lt;br /&gt;
&lt;br /&gt;
=== Templates ===&lt;br /&gt;
&lt;br /&gt;
=== Template Layout Overrides ===&lt;/div&gt;</summary>
		<author><name>Darkick</name></author>
	</entry>
</feed>