== Widget settings ==
Every widget must have 3 necessary files: '''xml/main.xml''', '''xml/config.xml''' and '''xml/settings.xml''' and 2 or more optional files. If your widget provides different languages and skins it should contain '''xml/langs.xml''' and '''xml/skins.xml''' files respectively. They should be empty and will be overwritten after widget installation.
'''main.xml''' file should be empty. It will be overwritten after widget installation.
'''config.xml''' file contains current widget settings. These settings are used in Ray Admin panel in "Settings" section of the widget as current values. This file has the following structure:
{{{
...
}}}
Every item contains "'''key'''" and "'''value'''" attributes.
'''settings.xml''' file contains widget settings description and default values. These settings are used in the Ray Admin panel in the "'''Settings'''" section of the widget for respectively displaying settings controls. Settings that can't be changed through the "'''Settings'''" section in Ray Admin exist only in "'''config.xml'''". This file has the following structure:
{{{
-
-
-
-
-
}}}
Every item contains "'''type'''", "'''key'''", "'''default'''" and "'''range'''" attributes and two child nodes "'''caption'''" and "'''comment'''". The "'''default'''" attribute contains a default value for this setting.
The "'''range'''" attribute defines the range of values that can be set for this setting. It depends on the type of setting.
The "'''type'''" attribute can be one of the following:
'''string''' - any string value. Range - maximum string length.
'''number''' - any number. Range - numbers range ([minimum]:[maximum]).
'''boolean''' - logical value: true/false. Range should be empty.
'''select''' - enumerable setting. Range - all possible values for this setting (" " - separator). If you want to show numbers as selection options you can use a structure like [minimum]:[maximum] [step] (see example above).
"'''caption'''" and "'''comment'''" nodes contain setting caption and comment as values respectively.