Element Attrs array:
When you declare new element with Azura the attrs parameter is an array hold all setting fields for your element. Each setting field is described in a single array.
Parameters for element attrs field
Param name | Type | Description |
type | string | Setting field type. "Available types" section bellow list all types |
param_name | string | Setting field name, must be unique in the attrs array and will be use in the element template file |
label | string | Setting field label |
desc | string | Setting field description |
value | array | Setting field value options with key/value pair format. Example: array of options for selec field type |
default | string | Default setting field value |
iscontent | string | yes/no whether this setting field is content field for storing html text. Example: for textarea or editor type |
show_in_admin | bool | true/false whether show setting field value in admin, bellow element title and icon |
rgba | bool | true/false. For color type only, whether use rgba color value instead of hex |
image_attrs | array | for images type only. Define attributes attached to each image selected |
depends_on | array | Define field visibility depending on other field value |
Available Types
Value | Description |
text | text input field |
hidden | hidden input field |
textarea | textarea field |
select | select field with options from value parameter array |
animationselector | display a dropdown field to select css animation value |
checkbox | display checkbox fields from value parameter array |
radio | display radio fields from value parameter array |
switch | is radio type with this value array: 'value'=> array('value'=> array( 'Yes'=>'1', 'No'=>'0', ) |
image | single image selector |
images | multiple images selector. To use image_attrs parameter this element setting field must be element content field |
iconselector | Awesome icons font selector |
lineicon | Line icons font selector |
simplelineicon |
New - Simple Line icons |
etlineicon | New - Elegant Themes icons |
editor | default Joomla WYSIWYG Editor |
aceeditor | aceeditor |
tinymce | tinymce editor |
color | color picker |
sqlselect | default Joomla sql form field |
chromestyle | provides a list of template chrome style options grouped by template. |
menuitem | provides a drop down list of the available menu items from your Joomla site. |
article | Joomla article selector |
k2item | K2 item selector |
googlefonts | List of google fonts |
label | Display a label text only and has no value |
previewimage | Display a preview image only and has no value |
clearfix | Echo clearfix div for styling only |
Dependency field
It is possible to link field with another field by defining depends_on param. depends_on param is array with defined field name and values which will allow to display this linked field. Also it is possible to show field if linked field is has_value.
Parameter | Type | Description |
element | string | param_name value of the linked field |
value | array | List of linked element's values which will allow to display param |
has_value | bool | whether display field if value of linked field is not empty or not |
The screenshot bellow is an example of using dependency field: