createCollection( collectionID, type, title, tooltip, target, argument, overwrite, sortOrder)
Creates a collection according to the specified parameters, and adds it to the framework page
Parameter |
Description |
---|---|
collectionID |
Unique ID of a collection. An existing collection of any type with this ID is replaced by the new collection, if overwrite is true. |
type |
Type of the collection, as defined by the LSAPI.Collections.Types enumeration. |
title |
Collection title. An existing collection of any type with the same title is replaced by the new collection, if overwrite is true. |
tooltip (optional) |
Item tooltip. If not specified, title is used as a tooltip. |
target (optional) |
Specify if clicking on the collection should invoke an action. A valid target can be either of:
|
argument (optional) |
String argument that is passed to the callback function. Should be specified, if the target is a JavaScript callback function. |
overwrite (optional) |
Defines whether to overwrite an existing collection with the same collectionID or title. Default value is false. |
sortOrder (optional) |
Defines the relative position of the collection among other collections. Aligned with navigation priority mechanism: an integer value from 1 to 100, where 1 has the highest priority. |
Return Value
A Boolean indicating whether the operation succeeded