en:user:gs3_list_of_format_options
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:user:gs3_list_of_format_options [2019/10/21 21:15] – kjdon | en:user:gs3_list_of_format_options [2025/03/03 20:09] (current) – [Other] kjdon | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| + | |||
| + | |||
| ====== List of Greenstone3 Format Items ====== | ====== List of Greenstone3 Format Items ====== | ||
| Line 42: | Line 45: | ||
| |[[en: | |[[en: | ||
| |[[en: | |[[en: | ||
| + | |allowGLIEditing|false|top level|If set to true (or absent), allows editing of this collection using Webswing GLI| | ||
| ==== Parameter Defaults ==== | ==== Parameter Defaults ==== | ||
| Line 56: | Line 59: | ||
| 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. | 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 < | + | These can be added inside the < |
| ==== Templates ==== | ==== Templates ==== | ||
| Line 63: | Line 66: | ||
| ''< | ''< | ||
| + | ==== Other ==== | ||
| + | |||
| + | The '' | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | This will output META tags for any of these metadata elements present for the document, like: | ||
| + | < | ||
| + | <META CONTENT=" | ||
| + | </ | ||
| + | | ||
| + | To change the NAME attribute, use the '' | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | Will output | ||
| + | < | ||
| + | <META CONTENT=" | ||
| + | </ | ||
| + | |||
| + | < | ||
| ===== What can go inside a template? ===== | ===== What can go inside a template? ===== | ||
| ==== Links ==== | ==== Links ==== | ||
| Line 150: | Line 182: | ||
| |format|formatDate|turns ' | |format|formatDate|turns ' | ||
| |::: | |::: | ||
| + | |||
| + | === Table of Metadata === | ||
| + | |||
| + | Sometimes you want a table of metadata values. You can use < | ||
| + | A list of metadata elements, each containing the label that should be used for the metadata. | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| === Hidden metadata === | === Hidden metadata === | ||
| Line 157: | Line 204: | ||
| |hidden|true|If true, then the metadata will be retrieved from the server, but not displayed at that point. | | |hidden|true|If true, then the metadata will be retrieved from the server, but not displayed at that point. | | ||
| + | |||
| + | ==== Collection/ | ||
| + | |||
| + | These will be displayed in the current interface language (if available), otherwise in the default language. | ||
| + | |||
| + | ^Format Element^Greenstone2 equivalent^Description^ | ||
| + | | ||| | ||
| + | |''< | ||
| + | |''< | ||
| + | |''< | ||
| + | |''< | ||
| + | |''< | ||
| + | |''< | ||
| ==== Miscellaneous Things ==== | ==== Miscellaneous Things ==== | ||
| Line 162: | Line 222: | ||
| | ||| | | ||| | ||
| |''< | |''< | ||
| - | |''< | ||
| - | |''< | ||
| - | |''< | ||
| - | |''< | ||
| - | |''< | ||
| |''< | |''< | ||
| + | |''< | ||
| + | |||
| ==== Conditional ==== | ==== Conditional ==== | ||
| Line 241: | Line 298: | ||
| |lang|language code|Defines the language whose sorting conventions are to be used| | |lang|language code|Defines the language whose sorting conventions are to be used| | ||
| |data-type|text/ | |data-type|text/ | ||
| + | |||
| + | ==== Utility Functions ==== | ||
| + | |||
| + | There are many utility functions defined in src/ | ||
| + | |||
| + | They can be called explicitly using | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | args is a comma separated list of args. They can be XSLT variables, numbers, strings, XSLT elements/ | ||
| + | |||
| + | For example: | ||
| + | < | ||
| + | < | ||
| + | The collection was last built on < | ||
| + | </ | ||
| + | |||
| + | This code is getting the buildDate timestamp from collection metadata. Then it is formatting it using the formatTimeStamp function. | ||
| + | This function takes 4 arguments: | ||
| + | * the timestamp - here we use the raw_date variable we have just made | ||
| + | * an integer for timestamp type - 0 is seconds, 1 is milliseconds | ||
| + | * an integer for output format tupe - 0 is date, 1 is time, 2 is date and time, 3 is days ago | ||
| + | * the language code for which language you want the output in - here we use the attribute from the page element. | ||
| + | |||
| + | We could change this output to days ago: | ||
| + | The collection was last built < | ||
| ==== Additional Notes ==== | ==== Additional Notes ==== | ||
| + | |||
| Some of these options (< | Some of these options (< | ||
en/user/gs3_list_of_format_options.1571692517.txt.gz · Last modified: 2019/10/21 21:15 (external edit)
