Documentation

Additional fields for Site entity

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.

Field Description
THEME_CODEColor Palette. Theme description
THEME_CODE_TYPO Font settings.
B24BUTTON_CODESite widget ID. Passes JS-path to widget. For example, https://cdn.bitrix24.com/crm/loader_2_ibikwq.js
B24BUTTON_COLORWidget color, can accept values: site (uses main site color), button (uses color from widget settings)
UP_SHOWShow Up button: Y / N.
Backgorund image
BACKGROUND_USEUse feature: Y / N
BACKGROUND_PICTUREPath to image.
BACKGROUND_POSITIONPositioning: center (stretch), repeat (tiles).
BACKGROUND_COLORBackground color.
Analytics
GACOUNTER_USEUse Google Analytics: Y / N.
GACOUNTER_COUNTERGoogle Analytics counter code.
GACOUNTER_SEND_CLICKSend data on button and link clicks to Google Analytics.
GACOUNTER_SEND_SHOW Send data on page block views to Google Analytics.
GTM_USE Use Google Tag Manager.
GTM_COUNTERGoogle Tag Manager code.
Maps
GMAP_USEUse Google Maps: Y / N.
GMAP_CODEGoogle Maps code.
Site view layout
VIEW_USEEnable site view layout: Y / N.
VIEW_TYPEDisplaying type: no (without), ltr (padding from top and by the sides), all (padding from all sides).
Robots.txt
ROBOTS_USEShow your Robots.txt: Y / N.
ROBOTS_CONTENTRobots.txt content
User HTML
HEADBLOCK_USEUse: Y / N.
HEADBLOCK_CODEHEAD block, custom html.
User CSS
CSSBLOCK_USEUse: Y / N.
CSSBLOCK_CODECustom CSS code.
CSSBLOCK_FILELink to CSS file.

Example

Gets list of fields:

if (\Bitrix\Main\Loader::includeModule('landing'))
{
   $fields = \Bitrix\Landing\Site::getAdditionalFields(1);
   foreach ($fields as $field)
   {
      echo 'Code: ' . $field->getCode();
      echo ' @ ';
      echo 'Value: ' . $field->getValue();
      echo "\n";
   }
}

Update field for site with ID = 1:

if (\Bitrix\Main\Loader::includeModule('landing'))
{
   $res = \Bitrix\Landing\Site::update(
      1,
      [
         'ADDITIONAL_FIELDS' => [
            'UP_SHOW' => 'Y'
         ]
      ]
   );
}



© «Bitrix24», 2001-2024