Documentation

publicationFolder

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 when you want to learn more about API.

Site::publicationFolder(
   $folderId,
   $mark
);

Method publishes site folder. Requires access permission for folder publication.

Parameters

Parameters Description Available from version
$folderId Folder ID in site.
$mark Flag:
  • When true, publishes folder. Default value;
  • When false, deactivates folder.

Example

if (\Bitrix\Main\Loader::includeModule('landing'))
{
   $res = \Bitrix\Landing\Site::publicationFolder(146);
   if ($res->isSuccess())
   {
      echo 'Folder published';
   }
   else
   {
      foreach ($res->getErrors() as $error)
      {
         echo $error->getMessage() . '<br/>';
      }
   }
}


© «Bitrix24», 2001-2024
Up