Category formulierveld type

From Joomla! Documentation

Revision as of 07:25, 26 September 2015 by MartijnM (talk | contribs) (Created page with "Het '''category''' formulierveld type biedt een drop-down lijst met alle gepubliceerde categorieën van een bepaalde extensie. Indien de parameter een opgeslagen waarde heeft...")
Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎Nederlands • ‎español • ‎français • ‎हिन्दी

Het category formulierveld type biedt een drop-down lijst met alle gepubliceerde categorieën van een bepaalde extensie. Indien de parameter een opgeslagen waarde heeft wordt deze geselecteerd als de pagina voor het eerst wordt geladen. Indien niet, dan wordt de standaardwaarde (als die er is) geselecteerd. Indien het show_root attribuut 1 is, dan zal de eerste optie van de lijst een string zijn die de root categorie vertegenwoordigt (wat een te vertalen string is) en de waarde 0 krijgt.

Params.category.jpg
  • type (mandatory) must be category.
  • 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 categories will be retrieved. For example, to list content categories, use the value 'com_content'.
  • scope (optional) is an alias for extension.
  • show_root (optional) is whether a choice representing the root category will be shown.
  • default (optional) is the default category ID number.
  • description (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.
  • class (optional) is a CSS class name for the HTML form field. If omitted this will default to 'inputbox'.
  • published (optional) (true/false) is whether the drop down will show only published or unpublished categories.

Implemented by libraries/legacy/form/field/category.php.

Example XML parameter definition:

<field name="mycategory" type="category" extension="com_content" label="Select a category" description="" />


See also