Joomla XML Standard Field Type – Media

Standard field type Joomla XML – Media displays a field where you can select an image from the system media folder.

It looks like this:

The field code from the image looks like this:

<field name="myimage" type="media" directory="stories" label="Изображение" description="Описание поля"/>
Code language: YAML (yaml)

This field supports attributes:

  • name – the system name of the field.
  • type – the type of the field, in this case «media».
  • label – the display name of the field.
  • description – the displayed field description. In Joomla 3, it is displayed as a tooltip when hovering over a field name.
  • directory – directory for storing images. By default, the directory is specified by the system as /images/. The specified directory will be created inside the /images/ folder by Joomla automatically.
  • preview – show or hide image preview as a tooltip on hover. The values are true and false.
  • preview_width – максимальная ширина изображения в предварительном просмотре. По умолчанию оно равно 200 пикселям.
  • preview_height – maximum image height in preview. By default it is 200 pixels.

For now, that’s all there is to it about the Joomla XML field type – Text. If we receive new information, it will be added to this article.

Do you need help generating an XML file? Write to us at admin@iws.by and we will help you.

Leave a Reply