Documentation

setForLanding

Attention! We strongly recommend first to learn more about Sites module REST documentation to understand how the module functions (with REST available in Bitrix24 Self-hosted editions). View this documentation as useful source when working with Bitrix24 Self-hosted editions and find out more details about API and only REST is not enough.

public function TemplateRef::setForLanding(
   $id,
   $data
)

Method sets up included areas for a page within a specific template (page must be already associated with template via the field TPL_ID).

Parameters

Parameter Description
id Page ID.
data Array of data for setup (when array is empty or not passed, setup areas are reset). Array keys are area IDs and values - are page IDs to be setup as areas.

Example

if (\Bitrix\Main\Loader::includeModule('landing'))
{
   \Bitrix\Landing\TemplateRef::setForLanding(
      34,
      [
         1 => 123,
         2 => 456
      ]
   );
}


© «Bitrix24», 2001-2024
Up