addItem Method
Use
addItem(item, collectionID, parentID, overwrite)
Adds an existing item to an existing collection according to the specified parameters
|
Parameter |
Description |
|---|---|
|
item |
An Item object representing the item to add to the collection |
|
collectionID |
ID of a collection to which to add the specified item. |
|
parentID (optional) |
ID of the parent item (folder) that should contain the added item. Relevant for nested collections (currently only for menus); for other collections types, a null value is expected. |
|
overwrite (optional) |
Defines whether to overwrite an existing item with the same itemID or title. Default value is false. |
Return Value
-
True, if the item was added.
-
False, if the item was not added or overwritten, either because an item with the specified parameters already exists in the specified collection, or the specified collection was not found.