view
Attention! We strongly recommend first to learn more about REST documentation for Sites module 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.
public function view( array $params = array() );
Main method for displaying the page, used in both editor and for publishing. Displays blocks one after another in browser, framing the blocks and adds JS-scripts in editor.
Parameters
Parameter | Description | Version |
---|---|---|
params | array of parameters that can contain: parse_link (true/false – replace link markers and blocks, turn by default), apply_template (true / false – applies page template when page has composite layout (for example, with a footer and header), true be default) |
Example
if (\Bitrix\Main\Loader::includeModule('landing')) { \Bitrix\Landing\Landing::setEditMode(true); $landing = \Bitrix\Landing\Landing::createInstance( 1 ); if ($landing->exist()) { $landing->view(); } foreach ($landing->getError()->getErrors() as $error) { echo $error->getCode() . ': '; echo $error->getMessage(); echo "\n"; } }
© «Bitrix24», 2001-2024