Difference between revisions of "ModulePosition form field type"

From Joomla! Documentation

(Marked this version for translation)
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
<noinclude><languages /></noinclude>
 +
 +
<translate>
 +
<!--T:1-->
 
Provides a text input and button to set the position of a module.
 
Provides a text input and button to set the position of a module.
 +
</translate>
  
* '''type''' (mandatory) must be ''moduleposition''.
+
* '''type''' <translate><!--T:2-->
* '''name''' (mandatory) is the unique name of the field.
+
(mandatory) must be ''moduleposition</translate>''.
* '''label''' (mandatory) (translatable) is the descriptive title of the field.
+
* '''name''' <translate><!--T:3-->
* '''description''' (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.
+
(mandatory) is the unique name of the field.</translate>
 +
* '''label''' <translate><!--T:4-->
 +
(mandatory) (translatable) is the descriptive title of the field.</translate>
 +
* '''description''' <translate><!--T:5-->
 +
(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.</translate>
 +
 
 +
<translate><!--T:6-->
 +
Example XML Definition</translate>
  
Example XML Definition
 
 
<source type="xml">
 
<source type="xml">
 
<field name="position" type="moduleposition"
 
<field name="position" type="moduleposition"
Line 15: Line 26:
 
</source>
 
</source>
 
 
[[Category:Standard form field types]]
+
<translate>
 +
<!--T:7-->
 +
If adding this field to a fieldset outside of the com_modules scope you will have to include '''addfieldpath="administrator/components/com_modules/models/fields"''' in your '''<fieldset>''' tag
 +
</translate>
  
If adding this field to a fieldset outside of the com_modules scope you will have to include '''addfieldpath="administrator/components/com_modules/models/fields"''' in your '''<fieldset>''' tag
+
<source type="xml">
 +
<fieldset name="fieldsetname" label="myfield"
 +
  addfieldpath="administrator/components/com_modules/models/fields"
 +
>
 +
</source>
  
 +
<translate>
 +
<!--T:8-->
 
If set up properly, you will see a button displayed next to the textbox (with Joomla standard language text that you can set up to say what you wish in your language file) which when clicked, brings up the standard module position selection window you're used to seeing in the Module Manager.
 
If set up properly, you will see a button displayed next to the textbox (with Joomla standard language text that you can set up to say what you wish in your language file) which when clicked, brings up the standard module position selection window you're used to seeing in the Module Manager.
 +
</translate>
 +
 +
<translate>
 +
<!--T:9-->
 +
[[Category:Standard form field types]]
 +
</translate>

Revision as of 13:21, 5 February 2015

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

Provides a text input and button to set the position of a module.

  • type (mandatory) must be moduleposition.
  • name (mandatory) is the unique name of the field.
  • label (mandatory) (translatable) is the descriptive title of the field.
  • 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 Definition

<field name="position" type="moduleposition"	
	description="COM_MODULES_FIELD_POSITION_DESC"
	label="COM_MODULES_FIELD_POSITION_LABEL"
	default=""
	maxlength="50" />

If adding this field to a fieldset outside of the com_modules scope you will have to include addfieldpath="administrator/components/com_modules/models/fields" in your <fieldset> tag

<fieldset name="fieldsetname" label="myfield"
	  addfieldpath="administrator/components/com_modules/models/fields"
>

If set up properly, you will see a button displayed next to the textbox (with Joomla standard language text that you can set up to say what you wish in your language file) which when clicked, brings up the standard module position selection window you're used to seeing in the Module Manager.