items.GetSiteByTitle
Overview¶
This is the "GetSiteByTitle method" of the "Items Object". It gets site information based on the specified title.
Syntax¶
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | object | Yes | Specify the site title |
Return Value¶
Return an array of "apiModel" for the corresponding site.
Usage Examples¶
The following example gets site information with the title "Division Master" and outputs it to the log.
const sites = Array.from(items.GetSiteByTitle('Division Master'));
if (sites.length) {
sites.forEach(site => {
context.Log(site.SiteId);
context.Log(site.Title);
context.Log(site.ReferenceType);
})
}