-
Notifications
You must be signed in to change notification settings - Fork 10
Extensibility Settings
Mark Vincent edited this page May 24, 2019
·
8 revisions
This document is designed to explain the concepts of using settings with an Advanced Sidebox addon module. For further details, view the entire list of extensibility documents: Extensibility Docs
Define a setting in the _info()
function of your module and the value admin stores for that setting will be available in your module by accessing $settings['setting_name']
(where setting_name
is the name you supplied when defining the setting in the _info()
function)
function asb_example_info()
{
return array(
'title' => 'Settings Example',
[...]
'settings' => array(
'setting_name' => array(
'name' => 'setting_name',
'title' => 'Setting Name',
'description' => 'setting description',
'optionscode' => "text",
'value' => 'default value',
),
),
);
}
function asb_example_get_content($settings)
{
return $settings['setting_name'];
}
The above module would use the setting text entered by admin as the side box content. Not very useful but just for illustration.
For a slightly more polished version, look here: Simple Setting Example