SCSCompileAPI

Similar to the SCSRenderAPI, there is an SCSCompileAPI that is passed in to each compile function.

This contains the following properties and functions.

  • Properties:
    • navigationRoot: The ID of the node that is the root of the site.
    • navigationCurr: The ID of the current page node.
    • structureMap: All of the nodes of the site hierarchy and accessed by ID.
    • siteInfo: All the site properties.
  • Functions:
    • getContentClient: Gets the contentClient instance for use in Content API calls.
    • getCustomSiteProperty: Gets custom properties during site compilation.

      You can store custom data and properties at the site level, in the siteinfo.json file, to customize a site based on the data and properties. For example, you can change the page background texture, footer links, or website name.