Documentation

addLandingToMenu

Site::addLandingToMenu(
   int $siteId,
   array $data
): void

Method adds page to site menu (all include areas are checked). New item is added to menu if the key menu is available in the manifest. Method doesn't any information.

Parameters

Method Description Available from version
$siteId Site ID
$data Array with page data ([ID, TITLE]).

Example

if (\Bitrix\Main\Loader::includeModule('landing'))
{
   \Bitrix\Landing\Site::addLandingToMenu(
      123, [
        'ID' => 12,
        'TITLE' => 'New item'
      ]
   );
   while ($row = $res->fetch())
   {
      print_r($row);
   }
}


© «Bitrix24», 2001-2024