landing.landing.addByTemplate
Scope: landing Permissions to execute: for all
The method is used to add landing page to a template (list of templates is visible to the user before creating a landing page). Returns ID of created landing page or an error.
You cannot modify fields of created page, use the method landing.landing.add instead.
Parameters
Parameter | Description | Available from version |
---|---|---|
siteId | ID for the site containing the created page. | |
code | ID for the created template. You can fetch list of templates via the method landing.demos.getPageList. | |
fields | Optional. You can pass array of fields for the created page. Presently only supports the keys TITLE and DESCRIPTION. |
Example
BX24.callMethod( 'landing.landing.addByTemplate', { siteId: 870, code: 'agency', fields: { TITLE: 'Page title', DESCRIPTION: 'Page description' } }, function(result) { if(result.error()) console.error(result.error()); else console.info(result.data()); } );
© «Bitrix24», 2001-2024