The configuration file, module.ini
, identifies the module to
Perforce Chronicle and specifies its initial configuration. The following example shows the
contents of a typical configuration file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ; Perforce Module version = 1.0 description = A description of the module. icon = icon.png tags = comma-separated, free-form, tags, describing, module, attributes enabledByDefault = true [maintainer] name = Maintainer Name email = "maintainer@email.address" [dependencies] module.Foo = "1.*" library.Zend = "1.10.*" [stylesheets] all.href = reset.css screen.media = screen screen.href[] = layout.css screen.href[] = layout.css print.media = print print.href = print.css [scripts] javascript[] = common.js |
The following sections provide details about the contents of the configuration file. Note that all fields are optional.
Table 14.1. Module Configuration Elements
Element | Description | ||||||
---|---|---|---|---|---|---|---|
version | The revision of the module. | ||||||
description | Describes the general characteristics of the module, for example, special features or intended use. | ||||||
tags | Descriptive terms used for ad-hoc categorization of modules. | ||||||
icon | A graphic for the module, specified using a URL relative to an image file in the module's folder. The suggested size is 128x128 pixels. The icon is displayed in the list of modules on the Manage Modules page. | ||||||
enabledByDefault | When creating a web site, enable the module by default. | ||||||
[maintainer] | The name, email, and web site of the person who maintains the module. | ||||||
[dependencies] |
Lists other modules and libraries that this module requires.
The format of this list is:
|
||||||
[stylesheets] |
Defines the CSS stylesheets that must be included during
HTML generation. Specify the stylesheet paths relative to
the module's resources folder. The media may be
specified as all, screen or
print; additionally conditions can be appended as dash
separated values following the media type:
|
||||||
[scripts] |
A list of client-side script files to include on every page. Group scripts
by programming language (for example, javascript,
vbscript). Specify scripts using an
URL that is relative to the module's
resources folder, or use an absolute
URL.
|
||||||
[dojo] |
Lists Dojo modules that are provided by the module. For example:
dojo.foo.base Dojo module, in the
dojo/foo folder with the name base (the
.js JavaScript extension is automatically appended).
The example also declares that the module provides the
dojo.foo Dojo module to users that have the add privilege for the users resource.
|
||||||
[configure] |
Specifies that the module is configurable and specifies the
module/controller/action route parameters to use to
configure the module. For example:
controller , but module and
action are optional. module defaults to the module
that is being described and action defaults to the
index action. You can specify additional parameters, which are
incorporated into the assembled URI.
|
||||||
[routes] |
Provide custom routing rules for the module. For example:
|
||||||
[menus] |
Defines default menus and the items that they contain. For example:
|
||||||
[types] |
Defines content types, which control the structure of content entries. For
example:
<Or: <Valid values for settings in this region are as follows:
|
||||||
[widgets] |
Declares widget types provided by the module. Widgets are configurable
action controllers. To add a widget type, you must specify the controller.
Be sure to provide a label and description. Optionally, you can specify an
icon and default options for the widget configuration. For example:
|
||||||
[acl] |
Declares resources, privileges and default "allow" rules that are relevant
to the module. For example:
|
||||||
[workflows] |
Declares workflows, the content types affected, the states content should be
guided through. Each state can include declarations for available
transitions, conditions, and actions. For example:
module.ini requires the
workflow identifier and 'states', as demonstrated above.
|