newPublisherDocumentPageFromTemplateV2()
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Copies a page template’s content into a new document page.
export declare function newPublisherDocumentPageFromTemplateV2(body: IPublisherPageBodyV2 & Partial<Pick<IPublisherDocumentPageV2, "id" | "visible">>, id?: string): IPublisherDocumentPageV2;
Parameters
Parameter | Type | Description |
|---|---|---|
body | IPublisherPageBodyV2 & Partial<Pick<IPublisherDocumentPageV2, “id” | “visible”>> | |
id | string | (Optional) |
Returns
Remarks
The page is a deep copy with its own page id. Widget ids stay as written, so pages made from one template share widget ids; a widget is addressed by page id plus widget id.
A document page can be passed as the template: its id is replaced and its visible is dropped.