The configuration file
From Site Foundry
A quick look at the layout
The layout for a module configuration file (/modules/[module_name]/config.inc) is as follows:
[module_details] resource_name = module_name menu_name = Module name uri = module_name management_inc = true|false direct_template = true|false front_end = true|false template_upload = true|false additional_templates = true|false templates = ""
And here's the explanation
Following are the explanations of the values contained in the above file:
resource_name
Type: String
Definition
Main name of the class to be instantiated. It is important to get this right - as Site Foundry will look in the modules folder for a folder labelled with this title. You will also need to name your class with this as well. For example, if you were creating a news module, you would enter news as the resource name, then create a folder called news to contain your files, and finally name the classes in both the frontend.class.php and backend.class.php news.
menu_name
Type: String
Definition
The title displayed in the modules dropdown in the management section of the application.
uri
Type: String
Definition
At this stage, this should be the same as the value of resource_name.
management_inc
Type: Boolean (true/false)
Definition
Set to include the module in the modules dropdown of the management section of the application.
direct_template
Type: Boolean (true/false)
Definition
Set to display a direct edit edit link next to the area assignment dropdowns. Please note, if you set this to true, you must handle incoming requests from either manage pages, or the template manager.
front_end
Type: Boolean (true/false)
Definition
Include this module in any assign template areas dropdown.
template_upload
Type: Boolean (true/false)
Definition
Allow administrators to upload a template directly into the module from the template manager. This is not a heavily developed part of the application, and currently only uploads the .tpl into a folder labelled templates and the thumbnail into a folder labelled templates/thumbs/ within the module's folder.
You are then free to use this in whatever way you require within your module. Please note that you will need to retrieve the serialised array from the sf_site_templates table saved with the name of the resource you are using.
additional_templates
Type: Boolean (true/false)
Definition
Set to inlclude any additional templates that will be shown to an administrator next to the assign template areas dropdowns in manage pages, and the template manage. In this way you can create a number of user defined states for your module.
templates
Type: String
Definition
A comma separated list of the additional templates (states) set by the boolean additional_templates. For example
templates = "latest_news,main,most_recent"

