Difference between revisions of "Componentlayout form field type"

From Joomla! Documentation

 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
The '''componentlayout''' form field type provides a drop down list of all available layouts for a view of an extension.  If the parameter has a saved value this is selected when the page is first loaded.  If not, the default value (if any) is selected.   
+
<noinclude><languages /></noinclude>
 +
<translate><!--T:1-->
 +
The '''componentlayout''' form field type provides a drop down list of all available layouts for a view of an extension.  If the parameter has a saved value this is selected when the page is first loaded.  If not, the default value (if any) is selected.</translate>  
  
* '''type''' (mandatory) must be componentlayout.
+
<translate><!--T:2-->
* '''name''' (mandatory) is the unique name of the parameter.
+
* '''type''' (mandatory) must be ''componentlayout''.</translate>
* '''label''' (mandatory) (translatable) is the descriptive title of the field.
+
<translate><!--T:3-->
* '''extension''' (mandatory) is the name of the extension for which the layouts will be retrieved (e.g. 'com_content').  
+
* '''name''' (mandatory) is the unique name of the parameter.</translate>
* '''view''' (mandatory) is the name of the view for which the layouts will be retrieved (e.g. 'article').
+
<translate><!--T:4-->
* '''useglobal''' (optional).
+
* '''label''' (mandatory) (translatable) is the descriptive title of the field.</translate>
* '''description''' (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.
+
<translate><!--T:5-->
 +
* '''extension''' (mandatory) is the name of the extension for which the layouts will be retrieved (e.g. 'com_content').</translate>
 +
<translate><!--T:6-->
 +
* '''view''' (mandatory) is the name of the view for which the layouts will be retrieved (e.g. 'article').</translate>
 +
<translate><!--T:7-->
 +
* '''useglobal''' (optional).</translate>
 +
<translate><!--T:8-->
 +
* '''description''' (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.</translate>
  
Example XML parameter definition:
+
<translate><!--T:9-->
 +
Example XML parameter definition:</translate>
 
<source lang="xml"><field name="mylayout" type="componentlayout" extension="com_content" view="article" label="JFIELD_ALT_LAYOUT" useglobal="true" description="JFIELD_ALT_COMPONENT_LAYOUT" /></source>
 
<source lang="xml"><field name="mylayout" type="componentlayout" extension="com_content" view="article" label="JFIELD_ALT_LAYOUT" useglobal="true" description="JFIELD_ALT_COMPONENT_LAYOUT" /></source>
 +
 +
<translate>=== See also === <!--T:10--></translate>
 +
<translate><!--T:11-->
 +
* [[S:MyLanguage/Standard form field types|List of standard form field types]]</translate>
 +
 
<noinclude>
 
<noinclude>
=== See also ===
+
<translate>
* [[Standard form field types|List of standard form field types]]
+
<!--T:12-->
[[Category:Standard form field types]]</noinclude>
+
[[Category:Standard form field types]]
 +
</translate>
 +
</noinclude>

Latest revision as of 14:44, 7 September 2015

Other languages:
Deutsch • ‎English • ‎Nederlands • ‎español • ‎français

The componentlayout form field type provides a drop down list of all available layouts for a view of an extension. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.

  • type (mandatory) must be componentlayout.
  • name (mandatory) is the unique name of the parameter.
  • label (mandatory) (translatable) is the descriptive title of the field.
  • extension (mandatory) is the name of the extension for which the layouts will be retrieved (e.g. 'com_content').
  • view (mandatory) is the name of the view for which the layouts will be retrieved (e.g. 'article').
  • useglobal (optional).
  • description (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.

Example XML parameter definition:

<field name="mylayout" type="componentlayout" extension="com_content" view="article" label="JFIELD_ALT_LAYOUT" useglobal="true" description="JFIELD_ALT_COMPONENT_LAYOUT" />

See also[edit]