Get collection name from a CMS page
page.getCollectionName()
Get the name of the collection that generated the collection-generated page.
Syntax
Returns
Promise<string
>
A promise that resolves to the name of the collection that generated the page.
Example
Error Handling
If the method fails to find a collection, the method will return an error with the following tag and message.