How to format the output of your collection

The full list of formatting options is shown here. But for more information about how to use these options, the developer's guide is the place to go.

Site-wide formatting options
These should be placed in gsdl/etc/main.cfg.

Syntax: SiteFormat  

Collection-specific formatting options
These should be placed in gsdl/collect/ /etc/collect.cfg.

Syntax: format  

Formatting Lists
The standard use of format statements is for the lists in search results, classifiers etc. Here is a list of the various lists available for format, and what they control. Note that classifiers are numbered from 1 upwards, in the order that they appear in the config file.

Extended metadata names
There are a few options for displaying metadata. The basic way is to specify e.g. [Title] or [dc.Title]: this displays the value of that particular metadata element for the current document/section. Metadata names can be prefixed by parent: or sibling. The following examples all use Title or Subject metadata, but any metadata could be used, including ones with namespaces (e.g. dc.Title). Any metadata name can also be prefixed by "cgisafe:". This results in the value being formatted so that it is safe to put in a URL.

Extended Formatstring items
These items are only available if AllowExtendedOptions is true.

Preserving the original directory structure of your collection for browsing
The situation: You have a nested folder structure which you have dragged and dropped into Greenstone, and you want to have this folder available for browsing in the built collection.

To achieve this:  Open the GLI application (Greenstone librarian interface).

If you had already created it, open your existing collection--the one with the folder structure--in GLI.

Otherwise create such a collection by dragging and dropping your nested folder structure into the right-hand panel of GLI's Gather tab.

Next you'll be creating metadata that specify a relative directory path, so that the folder structure is mirrored in the browsing classifier:

Click on the Design tab. In the left-hand pane, select Browsing Classifiers. Choose to add a Hierarchy classifier from the drop down box in the right-hand pane.

Configure the Hierarchy classifier you've just added by clicking on the Configure Classifier button at the bottom:  set its "separator" field to: [\\\/|\\\\]</li> in the "metadata" field, choose a metadata field that you think makes sense to specify the folder structure in. For example, you may choose dc.Subject and Keywords. In the example collection I created, I just picked dc.Resource Type.</li> </ul></li>

Click on the Enrich tab.

We're going to assign the directory structure as metadata now.</li>

In the left-hand panel, browse to each of the innermost subfolders: the folders that contain the actual files. Perform the following for each of these innermost FOLDERS:

Click to select this folder and set the metadata for the field you chose in (4) above to be the relative directory path to this folder.

For instance, assume that the metadata field you wanted to set was dc.Resource Type. If one of the innermost folders you were working with was labelled "1ASCii" and was nested inside the folder structure Encodings/Ascii/, then you'd go down into the 1ASCii folder and type "Encodings/Ascii/1ASCii" as the value for the dc.Resource Type metadata. This is because the folder 1ASCii was nested inside folder Ascii which was located in Encodings.</li>

If you've provided the directory path for each of the inner folders in the chosen metadata field, then click on the Create tab and press the Build Collection button.</li>

Once built, preview the Collection by pressing the Preview Button.</li>

In the web browser that opens, click on the link of the browing classifier for which you added the Hierarchy classifier. For instance, if the dc.Resource Type metadata was associated with the Hierarchy Classifier (as in the example in (6) above), then you'd click on the classifier "types" and browse down to see the files.</li> </ol>