User Tools

Site Tools


en:user_advanced:gs3_search_field_display
This version (2016/07/27 22:15) is a draft.
Approvals: 0/1

This is an old revision of the document!


Customising the field list display in Greenstone 3

Levels

<level name="section"/>

This will be displayed using level.section from the ServiceRack.properties dictionary.

<level name="section">
  <dosplayItem name="name" lang="fr">Chaptires</displayItem>
  <displayItem name="name" lang="en">Chapters</displayItem>
  <displayItem name="name" key="level.chapter"/>
</level>

For english, the lang=en displayItem will be used, as it matches the current lang. For languages where there is not a specific displayItem, it will use one with a key (if present). This key (level.chapter) is looked up in the ServiceRack.properties dictionary (for the approprate language). If it can find a value, then this will be used. If no value is found, then the first displayItem will be used as a default (in this case, the french version). If for some reason, no displayItem values are found (eg if only a key type one is present and the key hasn't been defined), then it will default to using level.section from the ServiceRack dictionary.

(See getDisplayText in service/ServiceRack.java, and getLevelData in service/AbstractGS2FieldSearch.java)

The order of precedence

en/user_advanced/gs3_search_field_display.1469657714.txt.gz · Last modified: 2016/07/27 22:15 by kjdon