OpenWGA 7.7 - TMLScript reference
HDBModelMethod :
getDocument(id [, parent])
On object | HDBModel |
Usage | Retrieves a document by its HDBModel id |
Description |
This method can be given either a content id or a storage id to retrieve contents or storages. Parameter "parent" identifies the parent document of the document to retrieve. For everything but root storages this is necessary, as content and storage ids are only unique below their individual parent. Without parameter "parent" given it will only return root storages. |
Parameters |
id (String): Either a content id or a storage id parent (WGAPI-Object WGContent, optional): The parent document of the document to retrieve. Omit to retrieve a root storage. |
Return value | A WGAPI-Object WGContent if a document was found, null otherwise |
Allowed in script types |
|