Skip to content

Instantly share code, notes, and snippets.

@ArtemSites
Created August 14, 2019 11:18
Show Gist options
  • Save ArtemSites/50a29c424c27f8e1e8a6d8410228c07f to your computer and use it in GitHub Desktop.
Save ArtemSites/50a29c424c27f8e1e8a6d8410228c07f to your computer and use it in GitHub Desktop.
Birtix Подключение разных файлов в зависимости от пути.
<? if (CSite::InDir('/rent/')) { ?>
<? include $_SERVER['DOCUMENT_ROOT'] . '/include/phone_sale.php' ?>">
<? $APPLICATION->IncludeComponent(
"bitrix:main.include",
"",
Array(
"AREA_FILE_SHOW" => "file",
"AREA_FILE_SUFFIX" => "inc",
"EDIT_TEMPLATE" => "",
"PATH" => SITE_DIR . "include/phone_sale.php"
)
); ?>
<? } else {?>
<? include $_SERVER['DOCUMENT_ROOT'] . '/include/phone.php' ?>">
<? $APPLICATION->IncludeComponent(
"bitrix:main.include",
"",
Array(
"AREA_FILE_SHOW" => "file",
"AREA_FILE_SUFFIX" => "inc",
"EDIT_TEMPLATE" => "",
"PATH" => SITE_DIR . "include/phone.php"
)
); ?>
<? } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment