7.8 Format Settings

This section discusses the dark art of format settings, and how the Librarian Interface simplifies and enhances access to this powerful feature of Greenstone.

Contents
Simple instructions
  Format commands
  Static vs. Dynamic features
  Components
  Flag controls
  Format string editing
  Add format command
  Remove format command
  Editing assigned controls
Simple Instructions:

Format strings are how you control the appearance of your collection, from where buttons appear on the screen to what colours and icons are displayed in the horizontal component of a DateList classifier. The procedure of using formatting commands can be quite daunting.

Below the instructions text area are several controls. The lower third of this control area depends on the type of feature you have selected, static vs. dynamic, flag vs. format string. The list at the top of the control area shows the format commands exactly as they appear in the collection configuration file. The two ComboBoxes in the centre (one of which may be disabled, again depending on feature selection) allow you to specify what feature and component are to be formatted.

When you begin choosing what feature you wish to format, keep in mind that there are two (overlapping) types of feature: static and dynamic. Static features are always the same and are used to format more general parts of the Greenstone collection, such as whether documents show a cover image, or whether the collection should behave differently as it is exclusively HTML based???. Dynamic features are ones based upon the classifiers assigned to the collection. When a selection is made from the 'Choose feature' ComboBox, the controls below change to reflect the current selection.

If the selected feature is associated with a browsable result page, such as the dynamic features or the static feature Search, there are several components of this page that may be formatted separately. The possible components are DateList, HList, Invisible or VList. For an explanation of these components please refer to the Greenstone Developers Guide. You may also apply a format to an entire feature by choosing the blank entry from the ComboBox. You may also decide to set a default format for all components of a certain type by choosing a blank entry for the features ComboBox.

Many of the static featured are 'flags' that have only an on or off state. Selecting one of these changes the controls at the button of the view to toggle buttons titled 'True' and 'False'. Selecting one deselects the other. For example, to format DocumentArrowsBottom so that next and previous arrows are show at the bottom of the page, select DocumentArrowsBottom from the feature ComboBox and then click on the True button to prepare the appropriate format command.

The second type of control provides you with a text area title 'Edit Format String' with a sidebar of controls titled 'Variables'. I will not go into the details of how to write format strings; again, refer to the Greenstone Developers Guide.

To make string editing simpler a list of predefined 'variables', including the current assigned metadata elements, are provided in a ComboBox. To add a certain variable, first ensure that the editing caret is at the appropriate place within the text area. Next choose the variable from the ComboBox, then press [I]nsert to insert the variable at the cursor position.

To add a new format command, fill out the details as explained above and click [A]dd Format. The new format command appears in the list of 'Currently Assigned Format Commands'.

To remove a format command, select it from the list of assigned format commands, then click [R]emove Format.

To alter an assigned format command, select it from the assigned commands list. The command's details appear in the editing controls; change them as desired. Any changes will be immediately reflected in the assigned command. Select a different feature to stop editing.