Difference between revisions of "Componentlayout form field type"
From Joomla! Documentation
(Created page with "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...") |
|||
(One intermediate revision by the same 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. | 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 | + | * '''type''' (mandatory) must be componentlayout. |
* '''name''' (mandatory) is the unique name of the parameter. | * '''name''' (mandatory) is the unique name of the parameter. | ||
* '''label''' (mandatory) (translatable) is the descriptive title of the field. | * '''label''' (mandatory) (translatable) is the descriptive title of the field. | ||
Line 10: | Line 10: | ||
Example XML parameter definition: | Example XML parameter definition: | ||
− | <source lang="xml"><field name="mylayout" type="componentlayout" extension="com_content" view="article" label=" | + | <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> |
<noinclude> | <noinclude> | ||
=== See also === | === See also === | ||
* [[Standard form field types|List of standard form field types]] | * [[Standard form field types|List of standard form field types]] | ||
[[Category:Standard form field types]]</noinclude> | [[Category:Standard form field types]]</noinclude> |
Revision as of 14:48, 15 January 2012
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" />