There is always a great deal of Joomla! development activity underway and communicating with other developers in the community is essential. This site is a resource for anyone looking to build or maintain software based on the Joomla! platform.
Where to Start
XML
About
Coding Standards
Client Side Syntax Style Guides
Appendices
Attributes
- Each attribute is on its own line.
- The four attributes
name
,type
,label
anddescription
should be written in this order and at the top of the element definition.
Closing Elements
Elements should be closed with the closing tag on a new line.
Exception
When the element only has few attributes, then the whole element can stay on the same line. A max line length of 100 characters is recommended for good reading.
Examples
Element is empty:
<field
name="abc"
type="text"
label="Empty Field"
description="Empty field without options"
/>
Element is not empty:
<field
name="abc"
type="radio"
label="Field"
description="Field with options"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="abc"
type="radio"
label="Field"
description="Field with options"
>
<option
value="1"
foo="bar"
>
SOMETHING_VERY_LONG
</option>
<option value="0">
SOMETHING_VERY_LONG
</option>
</field>
Element with only a few attributes
<fieldset name="params" label="Some label for the field set" />