Skip to content

Instantly share code, notes, and snippets.

@geff21st
Created June 12, 2018 11:35
Show Gist options
  • Save geff21st/d0a832ebac26b562cb521679a4f9f96b to your computer and use it in GitHub Desktop.
Save geff21st/d0a832ebac26b562cb521679a4f9f96b to your computer and use it in GitHub Desktop.
<?php
function includeLandingPage($page) {
global $APPLICATION;
if (empty($page)) return;
$APPLICATION->RestartBuffer();
include($_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/landing24/header.php");
$APPLICATION->IncludeComponent('bitrix:landing.pub', '', array(
'HTTP_HOST' => $_SERVER['HTTP_HOST'],
'PATH' => $page,
), null, array('HIDE_ICONS' => 'Y'));
include($_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/landing24/footer.php");
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_after.php");
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment