Author API Initialization
controls
Additional search options for the Item list view can be included for authors to use when performing repetitive searches. These options will appear in the search toolbar within the category drop-down menu.
You would want to use this to give authors quick access for searching by particular Tag types and Tag hierarchies.
There are several browse controls available:
- Tags - filter by Tags
- Tag hierarchies - filter by Tag hierarchy
- Separators - visually separate the additional search options
Examples
// Add quick search options for:
// - Tags with the type "Subject"
// - Tags with the type "Grade"
// - A Tag Hierarchy with the "Author" reference
var initializationOptions = {
"config": {
"item_list": {
"toolbar": {
"browse": {
"controls": [
{
"type": "tag",
"tag": { "type": "Subject" }
},
{
"type": "tag",
"tag": { "type": "Grade" }
},
{
"type": "separator"
},
{
"type": "hierarchy",
"hierarchies": [
{ "reference": "Author" }
]
}
]
}
}
}
}
};
Values
Attribute path config.item_list.toolbar.browse.controls
Type array[TagObject|HierarchyObject|SeparatorObject]
Type definitions
-
TagObject object
-
type string
Determines the type of the browse control to render. Specify
"tag"
for the Tag browse control. -
tag object
Object specifying which Tag type is browsable with this control.
-
label string
If provided, specifies the label to render for the tag control. By default, the Tag type is used.
-
type string
Tag type on which the drop-down menu control should operate.
-
-
-
HierarchyObject object
-
hierarchies array
Array of objects specifying which hierarchies are browsable with this control.
-
type string
Determines the type of the browse control to render. Specify
"hierarchy"
for the hierarchy browse control.
-
-
HierarchyConfig object
-
label string
If provided, specifies a label to render in the hierarchy selector drop-down menu for this hierarchy. By default, the hierarchy reference is used as the label.
-
reference string
Reference of a Tag hierarchy to include in the browse control. The specified hierarchy must be pre-configured by the Learnosity support team. Contact us for details.
-
-
SeparatorObject object
-
type string
Determines the type of the browse control to render. Specify
"separator"
for the separator browse control.
-