This API provides functionality that pertains to the page templates.

Accessed from the window at window.sas.vi.pageTemplate.

window.sas.vi.pageTemplate.getPageTemplateById(templateNumber);
interface PageTemplateApi {
    getPageTemplateById(templateId: number): Promise<Template>;
    getPageTemplateByUuid(templateUuid: string): Promise<Template>;
    getPageTemplatesByType(entityType: string, includeNoDataSource: boolean, clientApplication: ApplicationType, templateType: TemplateType): Promise<TemplateResourceSummary[]>;
    getTemplates(clientApplication?: ApplicationType, templateType?: TemplateType): Promise<TemplateResourceSummary[]>;
}

Methods

  • Parameters

    • templateId: number

      {number} The ID of the page template.

    Returns Promise<Template>

    A promise containing the page template metadata Template.

    Gets the page template with the specified ID.

  • Parameters

    • templateUuid: string

      {string} The UUID of the page template.

    Returns Promise<Template>

    A promise containing the page template metadata Template.

    Gets the page template with the specified UUID.

  • Parameters

    • entityType: string

      {string} The object type for which the templates are to be retrieved.

    • includeNoDataSource: boolean

      {boolean} Boolean to determine whether templates with no dataSource should be included.

    • clientApplication: ApplicationType

      {ApplicationType} The name of the application type used for this page. Must be a valid datahub client application (for example, desktop | mobile).

    • templateType: TemplateType

      {TemplateType} The name of the template type used for this page. Must be a valid datahub template type (for example, home | page).

    Returns Promise<TemplateResourceSummary[]>

    A promise of an array of TemplateResourceSummary.

    Retrieves all templates matching the parameters.

  • Parameters

    • OptionalclientApplication: ApplicationType

      {ApplicationType} The name of the application type used for this page. Must be a valid datahub client application (for example, desktop | mobile).

    • OptionaltemplateType: TemplateType

      {TemplateType} The name of the template type used for this page. Must be a valid datahub template type (for example, home | page).

    Returns Promise<TemplateResourceSummary[]>

    A promise which returns an array of TemplateResourceSummary

    Get all templates of a specific client and template type. If null params defaults to clientApplication = DESKTOP, templateType = PAGE