The reference screen is a split screen view of two documents side-by-side. It helps users to find information across multiple documents.
Example
The following is an example configuration for reference screens:
{ "ref_types": [ { "icon": "lightbulb", "ref_type": "reference2", "subtypes": [ { "query": "scrum", "ref_type": "reference2.mentions", "title": "Mentions" }, { "query": "scrum", "ref_type": "reference2.mentions2", "title": "More mentions" } ], "title": "Reference Documents" }, { "available": "true", "icon": "translate", "query": "scrum guide czech", "ref_item_title": "\n{% if \"original\" in ref_item.keywords.translation %}\n Original in {{ lang.get_name(ref_item.language) }}\n {% else %}\n Translated from {{ lang.get_name(item.language) }} to {{ lang.get_name(ref_item.language) }}\n {% endif %}\n", "ref_type": "translation", "title": "Translation" } ] }
The reference screen is accessed when clicking on the icon on a card that was defined in the reference configuration.
Example of reference screen detail view:
Configuration Reference
Reference Types
Top level array holding the individual reference type objects.
ref_types
Required
Type: array
Array containing all individually defined ref_type
objects.
Reference Type Object
ref_type
Required
type: string
Unique reference type name used internally
icon
Required
string
Material icon name used in Search results page and alongside the title above reference item
title
Required
type: string
Title to be displayed above reference item and as alt-text to icon in Search page
ref_item_title
type: string
Only used if present and no subtypes are specified. Reference item specific (overrides title
) to be displayed above reference item. Interpreted as Jinja2 template.
Accessible variables and functions:
`item` - the currently viewed item
`ref_item` - the referenced item
fields available in `item` and `ref_item`:
item.created_at
item.external_id
item.keywords
item.language
item.link
item.title
`lang.get_name(item.language)` - get a human readable language name based on ISO 639-1 code
query
type: string
Required if no subtypes are specified. Squirro search query used to return reference items for particular item. Interpreted as Jinja2 template.
Accessible variables and functions:
item
- the currently viewed item
ref_item
- the referenced item
fields available in
item
and ref_item
:
item.created_at
item.external_id
item.keywords
item.language
item.link
item.title
lang.get_name(item.language)
- get a human readable language name based on ISO 639-1 code
available
type: string
Optional dynamic field value based on item
. Interpreted as Jinja2 template.
Value interpretation:
true
- reference item are accessible and Icon on search page is active
false
- reference item are not present and Icon on search page is disabled
null
or other value - unknown state, Icon stays active on search page - same as if available
field was not specified.
Accessible variables and functions
item.created_at
item.external_id
item.keywords
item.language
item.link
item.title
Reference Subtypes
subtypes
type: array
List of reference subtypes if any.
Reference Subtype Object
ref_type
Required
type: string
Unique reference type name used internally
title
Required
type: string
Title to be displayed above reference item and as alt-text to icon in Search page
ref_item_title
type: string
description: Reference item specific (overrides title
) to be displayed above reference item. Interpreted as Jinja2 template.
Accessible variables and functions:
item
- the currently viewed item
ref_item
- the referenced item
fields available in
item
and ref_item
:
item.created_at
item.external_id
item.keywords
item.language
item.link
item.title
lang.get_name(item.language)
- get a human readable language name based on ISO 639-1 code
query
Required
type: string
Squirro search query used to return reference items for particular item. Required if no subtypes are specified. Interpreted as Jinja2 template.
Accessible variables and functions:
item
- the currently viewed item
ref_item
- the referenced item
fields available in
item
and ref_item
:
item.created_at
item.external_id
item.keywords
item.language
item.link
item.title
lang.get_name(item.language)
- get a human readable language name based on ISO 639-1 code