old:how_to_format_the_output_of_your_collection
Differences
This shows you the differences between two versions of the page.
old:how_to_format_the_output_of_your_collection [2015/08/19 22:09] – external edit 127.0.0.1 | old:how_to_format_the_output_of_your_collection [2019/09/24 01:32] (current) – removed kjdon | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | //**This page is in the ' | ||
- | We recommend checking for more up-to-date information using the search box.**// | ||
- | |||
- | ====== 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 [[http:// | ||
- | |||
- | |||
- | =====Site-wide formatting options===== | ||
- | These should be placed in // | ||
- | |||
- | Syntax: **SiteFormat < | ||
- | |||
- | ^Item^Description^ | ||
- | |HomePageCols int|Set the number of columns used to display collections on the home page. Default: 3| | ||
- | |HomePageType pulldown |Display the collection list on the home page as a pulldown menu, rather than using the default table of collection images. This alters the html that appears in the dynamically generated _homeextra_ macro. You can then move this macro around in home.dm. Default: not set| | ||
- | |||
- | |||
- | =====Collection-specific formatting options===== | ||
- | These should be placed in gsdl/ | ||
- | |||
- | Syntax: **format < | ||
- | |||
- | ^Item^Description^ | ||
- | |DocumentImages true/ | ||
- | |DocumentTitles true/ | ||
- | |DocumentHeading formatstring|This is used for a document heading at the top left if DocumentImages is false and DocumentTitles is true. Default: //< | ||
- | |DocumentContents true/false| Display table of contents (if document is hierarchical), | ||
- | |DocumentButtons string|Controls the buttons that are displayed on a document page. Valid options are Detach, Highlight, Expand Text, Expand Contents. Should be separated by < | ||
- | |DocumentText formatstring|Format of the text to be displayed on a document page Default: //< | ||
- | |DocumentArrowsTop true/ | ||
- | |DocumentArrowsBottom true/ | ||
- | |DocumentSearchResultLinks true/ | ||
- | |DocumentUseHTML true/ | ||
- | |NavigationBar pulldown|If set, provides a drop down list in place of the usual navigation bar (that contains search and classifier options). This alters the html that appears in the dynamically generated // | ||
- | |AllowExtendedOptions true/ | ||
- | |SearchTypes string | Controls whether plain and/or form search interfaces should be available for the collection (for mgpp and lucene collections only). Can be one or both of " | ||
- | |AllowUserComments true/ | ||
- | |||
- | =====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. | ||
- | |||
- | ^Item^Description^ | ||
- | |VList|Applies to all vertical lists, unless overridden by a more specific format item. These include search results, classifier lists, and document table of contents| | ||
- | |HList|Applies to all horizontal lists. Horizontal lists are often used in classifiers, | ||
- | |DateList|Applies to all date lists - these are the vertical lists generated by a DateList classifier.| | ||
- | |SearchVList|The vertical list of search results| | ||
- | |DocumentVList|The document table of contents| | ||
- | |CL1VList|Applies only to the vertical list of classifier 1| | ||
- | |CL1HList|Applies only to the horizontal list of classifier 1| | ||
- | |CL1DateList|Applies only to the DateList in classifier 1| | ||
- | |||
- | |||
- | =====Formatstring items===== | ||
- | |||
- | ^Item^Description^ | ||
- | |[link][/ | ||
- | |[href]|The href of the link to the document (Greenstone version), without the & | ||
- | |[srclink][/ | ||
- | |[equivDocLink][/ | ||
- | |[icon]|An appropriate icon for a classifier/ | ||
- | |[srcicon]|An appropriate icon for the original source document. E.g. Word, PDF, PS icon.| | ||
- | |[equivDocIcon]|An appropriate icon for a document that has been associated using the plugin option // | ||
- | |[num]|The document number (position in the search results - useful for debugging)| | ||
- | |[numleafdocs]|The number of documents below the current classifier node. This is often used as a test for classifier nodes, as numleafdocs will not be set for documents. This allows different formatting for classifier nodes and document nodes in a hierarchy.| | ||
- | |[Text]|The text of the current section| | ||
- | |[RelatedDocuments]|Related Documents info (if available). This is a vertical list of Titles (or Subjects if Titles aren't available) that link to the related documents. It is based on " | ||
- | |[highlight][/ | ||
- | |[Summary]|Displays Summary metadata if available, otherwise displays a short summary created on the fly.| | ||
- | |[DocOID]|The internal identifier of the current section of the document| | ||
- | |[DocTopOID]|The (top level) internal identifier of the current document (available 2.72)| | ||
- | |[DocRank]|The rank of the current document - used in search results| | ||
- | |[DocImage]|The URL to the cover image of the document| | ||
- | |[collection]|The directory name of the collection this document is from - useful in cross-collection searching. (version 2.61)| | ||
- | |[collection: | ||
- | |[metadata-name]|The value of this metadata element for the document| | ||
- | |||
- | =====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/ | ||
- | |||
- | ^Item^Description^ | ||
- | |[parent: | ||
- | |[parent(Top): | ||
- | |[parent(All): | ||
- | |[parent(All': | ||
- | |[child: | ||
- | |[child(All' | ||
- | |[child(2): | ||
- | |[child(last): | ||
- | |[sibling: | ||
- | |[sibling(All'< | ||
- | |[sibling(2): | ||
- | |[sibling(last): | ||
- | |[parent: | ||
- | |[child: | ||
- | |[cgisafe: | ||
- | |[cgisafe: | ||
- | |[format: | ||
- | |||
- | =====Extended Formatstring items===== | ||
- | These items are only available if AllowExtendedOptions is true. | ||
- | |||
- | ^Item^Description^ | ||
- | |[DocumentButtonDetach]|The Detach button| | ||
- | |[DocumentButtonHighlight]|The Highlight button| | ||
- | |[DocumentButtonExpandText]|The Expand Text button| | ||
- | |[DocumentButtonExpandContents]|The Expand Contents button| | ||
- | |[DocTOC]|The table of contents for a hierarchical document, or the next/ | ||
- | |||
- | =====Conditional expressions in formatstrings===== | ||
- | |||
- | ^Item^Description^ | ||
- | |{If}{[metadata], | ||
- | |{Or}{[metadata], | ||
- | |nested If/Or|{Or} can have another conditional as its final option, eg {Or}{[BookTitle], | ||
- | |{If}{[metadata] op value, action-if-true, | ||
- | |||
- | ^String^Numeric^Meaning^ | ||
- | |eq|==|equals| | ||
- | |ne|!=|not equals| | ||
- | |gt|> | ||
- | |ge|> | ||
- | |lt|< | ||
- | |le|< | ||
- | |sw| |starts with| | ||
- | |ew| |ends with| | ||
- | |||
- | //Note that only eq and ne are available for Greenstone versions 2.60 and earlier.// | ||
- | |||
- | |||
- | =====Preserving the original directory structure of your collection for browsing===== | ||
- | **The situation: | ||
- | |||
- | |||
- | **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 " | ||
- | * in the " | ||
- | |||
- | |||
- | * Click on the Enrich tab. | ||
- | |||
- | |||
- | We're going to assign the directory structure as metadata now. | ||
- | |||
- | * 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 " | ||
- | |||
- | * 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. | ||
- | |||
- | * Once built, preview the Collection by pressing the Preview Button. | ||
- | |||
- | * 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 " |
old/how_to_format_the_output_of_your_collection.1440022196.txt.gz · Last modified: 2019/09/24 01:32 (external edit)