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_CODE | Color Palette. Theme description | ||
THEME_CODE_TYPO | Font settings. | ||
B24BUTTON_CODE | Site widget ID. Passes JS-path to widget. For example, https://cdn.bitrix24.com/crm/loader_2_ibikwq.js | ||
B24BUTTON_COLOR | Widget color, can accept values: site (uses main site color), button (uses color from widget settings) | ||
UP_SHOW | Show Up button: Y / N. | ||
Backgorund image | |||
BACKGROUND_USE | Use feature: Y / N | ||
BACKGROUND_PICTURE | Path to image. | ||
BACKGROUND_POSITION | Positioning: center (stretch), repeat (tiles). | ||
BACKGROUND_COLOR | Background color. | ||
Analytics | |||
GACOUNTER_USE | Use Google Analytics: Y / N. | ||
GACOUNTER_COUNTER | Google Analytics counter code. | ||
GACOUNTER_SEND_CLICK | Send 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_COUNTER | Google Tag Manager code. | ||
Maps | |||
GMAP_USE | Use Google Maps: Y / N. | ||
GMAP_CODE | Google Maps code. | ||
Site view layout | |||
VIEW_USE | Enable site view layout: Y / N. | ||
VIEW_TYPE | Displaying type: no (without), ltr (padding from top and by the sides), all (padding from all sides). | ||
Robots.txt | |||
ROBOTS_USE | Show your Robots.txt: Y / N. | ||
ROBOTS_CONTENT | Robots.txt content | ||
User HTML | |||
HEADBLOCK_USE | Use: Y / N. | ||
HEADBLOCK_CODE | HEAD block, custom html. | ||
User CSS | |||
CSSBLOCK_USE | Use: Y / N. | ||
CSSBLOCK_CODE | Custom CSS code. | ||
CSSBLOCK_FILE | Link 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