landing.template.setSiteRef
landing.template.setSiteRef(id, data)
The method sets included sections for site within a specific template (site or page must be binded to the template via TPL_ID field). Returns true on success and error otherwise.
Parameters
Method | Description |
---|---|
id | Site ID. |
data | Array of data for set up (if the array is empty or not passed, the set sections will reset). The array keys are section IDs and values - are IDs of pages to be set as the section. |
Example
BX24.callMethod( 'landing.template.setSiteRef', { id: 557, data: { 1: 614, 2: 615, 3: 616 } }, function(result) { if(result.error()) { console.error(result.error()); } else { console.info(result.data()); } } );
© «Bitrix24», 2001-2025