User Tools

Site Tools


en:user:gs3_list_of_format_options

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:user:gs3_list_of_format_options [2017/04/03 02:26] anupamaen:user:gs3_list_of_format_options [2019/09/24 02:05] – [Options] kjdon
Line 1: Line 1:
 ====== List of Greenstone3 Format Items ====== ====== List of Greenstone3 Format Items ======
  
-The full list of formatting items is shown here. There are two main types of format items: options and templates. Options give you a switch to turn something on/off or change the look, while templates let you describe what output you want.+This page describes all the things that can go into the <format> element in the collectionConfig.xml file - or can be added in the Format->FormatFeatures pane in GLI. There are three main types of format items: options, parameter defaults, and templates. Options give you a switch to turn something on/off or change the look, parameter defaults let you change the default value of eg search parameters (stemming, casefolding etc) while templates let you describe what output you want.
    
 See also the description of [[en:user:gs3_format_statements|format statements]], and some [[en:user:gs3_sample_format_statements | sample format statements]] for miscellaneous tasks. See also the description of [[en:user:gs3_format_statements|format statements]], and some [[en:user:gs3_sample_format_statements | sample format statements]] for miscellaneous tasks.
Line 22: Line 22:
 |sectionExpandCollapse|true|display|? check if on when true or false| |sectionExpandCollapse|true|display|? check if on when true or false|
 |backToTopLinks| |display|?| |backToTopLinks| |display|?|
-|sideBar| |display| |+|sideBar|false |display|If false will not display any of the right side bar features, including cover image, search term highlighting checkbox, table of contents etc |
 |disableZoom|true|display| | |disableZoom|true|display| |
 |disableSearchTermHighlighting|true|display|If set to true, will not highlight search terms in the text, and will not display the on/off button for highlighting| |disableSearchTermHighlighting|true|display|If set to true, will not highlight search terms in the text, and will not display the on/off button for highlighting|
 |coverImage|true|display| | |coverImage|true|display| |
 |TOC|true|display| | |TOC|true|display| |
-|viewSelection|true|display| | +|viewSelection|false|display|If false, will not show the text/image/default view selector for paged image documents. 
-|slideShow|true|display| | +|slideShow|false|display|If false, will not display the slideshow option for paged image documents 
-|[[user_comments|AllowUserComments]]|true|display|If set to true, will allow users to add comments to public collections. Users need not have editing permissions for a collection they wish to add comments to. They just need to have an account on that Greenstone Digital Library.|+|[[user_comments|allowUserComments]]|true|display|If set to true, will allow users to add comments to public collections. Users need not have editing permissions for a collection they wish to add comments to. They just need to have an account on that Greenstone Digital Library. (was AllowUserComments prior to 3.10)| 
 +|[[en:user_advanced:web_editor|allowDocumentEditing]]|true|display|If set to true (or is absent), will allow authenticated users (that have been assigned the correct group) the ability to edit document text and metadata through the web site. Set this to false to disable document editing. (since 3.09, was AllowDocumentEditing for 3.09)| 
 +|[[en:user_advanced:web_editor|allowMapGPSEditing]]|true|display|If set to true (or is absent), will allow authenticated users (that have been assigned the correct group) the ability to add and edit GPS data through the web site. Set this to false to disable the Map GPS editing controls. (since 3.10)|
  
 +===== Parameter Defaults =====
  
 +Inside a format element you can set default values for parameters, using the following syntax
 +<code>
 +<paramDefault name="matchMode" value="all"/>
 +</code>
  
 +You can use this to set things like:
 +  * turn stemming on by default for mgpp collections: <code><paramDefault name="stem" value="1"/></code>
 +  * return all hits in one page instead of paging the results: <code><paramDefault name="hitsPerPage" value="-1"/></code>
 +
 +To see what parameters you have that you can change, you can look at the page source for a query page and see what names and values the form elements have.
 +
 +These can be added inside the <search> and <display> format statements inside GLI (or directly added to the collectionConfig.xml file).
 ===== Templates ===== ===== Templates =====
  
Line 96: Line 110:
 By default, gsf:metadata displays all values of the specified metadata field, for the current page or section of a document. You can change which page or section's metadata is output using the **select** attribute. And you can choose just a single value using the **pos** attribute. Or you can set **type='collection'** to retrieve collection level metadata. By default, gsf:metadata displays all values of the specified metadata field, for the current page or section of a document. You can change which page or section's metadata is output using the **select** attribute. And you can choose just a single value using the **pos** attribute. Or you can set **type='collection'** to retrieve collection level metadata.
 ^gsf:metadata Attribute^Possible Values^Description^ ^gsf:metadata Attribute^Possible Values^Description^
-|select|current|The current section (this is the default type; if ''select'' is not specified, the current section is assumed)|+|select| |Select a different node or set of nodes, relative to the current node. Only valid for documentNode templates, not in classifierNodes.| 
 +|:::|current|The current section (this is the default type; if ''select'' is not specified, the current section is assumed)|
 |:::|parent|The immediate parent section| |:::|parent|The immediate parent section|
 |:::|ancestors|All the parents back to the root (topmost) section| |:::|ancestors|All the parents back to the root (topmost) section|
Line 102: Line 117:
 |:::|siblings|All the sibling sections| |:::|siblings|All the sibling sections|
 |:::|children|The immediate child sections of the current section| |:::|children|The immediate child sections of the current section|
-|:::|descendents|All the descendent sections|+|:::|descendents|All the descendent sections (NOT YET IMPLEMENTED)|
 |pos|first, last or any number (1,2,3,etc.) |gsf:metadata by default displays all values of a metadata field for a document; this allows you to select which one you want (e.g. the first, second, 8th one listed)| |pos|first, last or any number (1,2,3,etc.) |gsf:metadata by default displays all values of a metadata field for a document; this allows you to select which one you want (e.g. the first, second, 8th one listed)|
 |:::|classifiedBy|If the document has multiple values for the metadata element that you have classified on, this allows you to select the value that was used to classify the document into its current position in the classifier. Only useful in documentNode templates for a classifier.| |:::|classifiedBy|If the document has multiple values for the metadata element that you have classified on, this allows you to select the value that was used to classify the document into its current position in the classifier. Only useful in documentNode templates for a classifier.|
Line 140: Line 155:
 |''<gsf:collectionText name='xxx'/>'' |Display the xxx from the current collection's colname.properties file (found in resources folder inside the collection) | |''<gsf:collectionText name='xxx'/>'' |Display the xxx from the current collection's colname.properties file (found in resources folder inside the collection) |
 |''<gsf:html>&lt;li&gt;</gsf:html>''| <li>|Sometimes you want to output some HTML that is not valid XML in the config file. For example, adding <li> and </li> as prefix and suffix to a list of metadata values. In the final HTML it will be valid XML, but in the template it won't be. So use escaped < and > and enclose the text in <gsf:html> tags.| |''<gsf:html>&lt;li&gt;</gsf:html>''| <li>|Sometimes you want to output some HTML that is not valid XML in the config file. For example, adding <li> and </li> as prefix and suffix to a list of metadata values. In the final HTML it will be valid XML, but in the template it won't be. So use escaped < and > and enclose the text in <gsf:html> tags.|
 +|''<gsf:variable name='xxx'>value</gsf:variable>'' |Will output an <xsl:variable> into the transform result. Also, sets gs.variables.xxx = value, which is available for use in javascript code.|
  
 ===== Conditional ===== ===== Conditional =====
en/user/gs3_list_of_format_options.txt · Last modified: 2024/06/03 23:50 by kjdon