SiteResponse | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Class SiteResponse<T>

    SiteResponse implements HTML pages rendered using site configuration from WHFS and site profiles

    Type Parameters

    • T extends object = object
    Index

    Constructors

    Properties

    contents: string = ""
    insertions: {
        "body-bottom"?: Insertable[];
        "body-devbottom"?: Insertable[];
        "body-top"?: Insertable[];
        "content-bottom"?: Insertable[];
        "content-top"?: Insertable[];
        "dependencies-bottom"?: Insertable[];
        "dependencies-top"?: Insertable[];
    }
    pageConfig: T

    The pageConfig. Not protected because we assume that if you know it's type T, its on you if you access it

    renderInserts: (point: InsertPoints) => Promise<string>
    siteRequest: CSiteRequest

    Methods

    • Append the specified text

      Parameters

      • text: string

      Returns void

    • Returns Record<string, boolean>

    • Insert a callback for use during rendering

      Parameters

      • where: InsertPoints
      • what: Insertable

      Returns void

    • Set data associated with a plugin

      Type Parameters

      • Type extends keyof FrontendDataTypes

      Parameters

      • dataObject: Type
      • data: FrontendDataTypes[Type]

      Returns void