Difference between revisions of "SiteConfig"
Jump to navigation
Jump to search
m (6 revisions imported) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
= What It Is = | = What It Is = | ||
The ''' | The '''SiteConfig''' file lives in <code>${RTHOME}/etc/RT_SiteConfig.pm</code>. Its purpose is to provide you a place to override config settings in <code>${RTHOME}/etc/RT_Config.pm</code> as well as add new config variables as provided by various user [[Contributions]] or for your own purposes. | ||
All of the available configuration options are documented in RT_Config.pm and also [http://bestpractical.com/rt/docs/latest/RT_Config.html available on the web]. | |||
You set a config variable like so: | |||
Set($Foo, "Value of Foo"); | Set($Foo, "Value of Foo"); | ||
Set($Bar, 1); | Set($Bar, 1); | ||
Set(@Baz, "array", "of", "values"); | Set(@Baz, "array", "of", "values"); | ||
Set(%Zot, "hash" => "of", "keyed" => "values" | Set(%Zot, "hash" => "of", "keyed" => "values"); | ||
You access them like this in RT 3.8 and newer: | You access them like this in RT 3.8 and newer: | ||
Line 18: | Line 17: | ||
RT->Config->Get('Bar') # 1 | RT->Config->Get('Bar') # 1 | ||
RT->Config->Get('Baz')->[0] # get option Baz that is array reference and access first element | RT->Config->Get('Baz')->[0] # get option Baz that is array reference and access first element | ||
= Plugins = | = Plugins = | ||
Line 44: | Line 36: | ||
)); | )); | ||
= | ==Custom Statuses:== | ||
RT 4 and after: [http://bestpractical.com/rt/docs/4.0/customizing/lifecycles.html Lifecycles] | |||
RT 3.8 and prior: [[CustomStatuses]] | RT 3.8 and prior: [[CustomStatuses]] | ||
Latest revision as of 16:37, 6 April 2016
What It Is
The SiteConfig file lives in ${RTHOME}/etc/RT_SiteConfig.pm
. Its purpose is to provide you a place to override config settings in ${RTHOME}/etc/RT_Config.pm
as well as add new config variables as provided by various user Contributions or for your own purposes.
All of the available configuration options are documented in RT_Config.pm and also available on the web.
You set a config variable like so:
Set($Foo, "Value of Foo"); Set($Bar, 1); Set(@Baz, "array", "of", "values"); Set(%Zot, "hash" => "of", "keyed" => "values");
You access them like this in RT 3.8 and newer:
RT->Config->Get('Foo') # "Value of option Foo" RT->Config->Get('Bar') # 1 RT->Config->Get('Baz')->[0] # get option Baz that is array reference and access first element
Plugins
Set(@Plugins, qw(RT::Extension::ResetPassword RT::Extension::MandatorySubject));
The following is an invalid way to define extensions as each declaration will override the previous:
Set(@Plugins, qw(Extension::QuickDelete)); Set(@Plugins, qw(RT::Extension::ResetPassword)); Set(@Plugins, qw(RT::Extension::MandatorySubject));
Note there are only spaces between the (full) extension name and any spaces are allowed, so the following is also valid:
Set(@Plugins, qw( RT::Extension::ResetPassword RT::Extension::MandatorySubject RT::Extension::QuickDelete ));
Custom Statuses:
RT 4 and after: Lifecycles
RT 3.8 and prior: CustomStatuses