#State
You can call the Addon State endpoint to get information about your Addon and the CMS.
let response = await axios.get(`http://localhost:${cmsPort}/api/addon/${addonId}/state`)
console.log(response.data.cms)
console.log(response.data.state)
import cms from 'static-cms-addon'
let cmsState = await cms.getCmsState()
let state = await cms.getState()
console.log(cmsState)
console.log(state)
#Addon State
Key | Function | Example Value |
---|
name | cms.getAddonName() | "my-addon" |
codePath | cms.getCodePath() | "/home/ubuntu/sites/my-site/local/cms/addon/my-addon/code" |
storagePath | cms.getStoragePath() | "/home/ubuntu/sites/my-site/local/cms/addon/my-addon/storage" |
sidebarItems | cms.getSidebarItems() | (array of Sidebar items) |
help | cms.getHelp() | (array of Help Pages) |
#CMS State
Key | Function | Value |
---|
assetPath | cms.getAssetPath() | "/home/ubuntu/sites/my-site/local/cms/asset" |
isDevelopmentModeEnabled | cms.isDevelopmentModeEnabled() | true |
isTrailingSlashEnabled | cms.isTrailingSlashEnabled() | true |
name | cms.getSiteName() | "My Site" |
timezone | cms.getTimezone() | "America/New_York" |
uuid | cms.getUuid() | "896559c8-a7d0-44f5-9f12-f5862f66f110" |