Answer the question
In order to leave comments, you need to log in
Can I prescribe additional array options for $APPLICATION->IncludeFile?
Can I write and output parameters besides Array("MODE"=>"html")?
<?
$APPLICATION->IncludeFile(
SITE_DIR."include/[name-shablon]/footer/file.php",
Array(),
Array("MODE"=>"html")
);
?>
<?
// включаемая область для раздела
$APPLICATION->IncludeFile($APPLICATION->GetCurDir()."sect_inc.php", Array(), Array(
"MODE" => "html", // будет редактировать в веб-редакторе
"NAME" => "Редактирование включаемой области раздела", // текст всплывающей подсказки на иконке
"TEMPLATE" => "section_include_template.php" // имя шаблона для нового файла
));
?>
Answer the question
In order to leave comments, you need to log in
I am inserting files like this
<?$APPLICATION->IncludeComponent(
"bitrix:main.include",
"",
Array(
"AREA_FILE_SHOW" => "file",
"PATH" => "/include/file.php"
)
);?>
<? CModule::IncludeModule("highloadblock");
use Bitrix\Highloadblock as HL;
use Bitrix\Main\Entity;
if (CModule::IncludeModule('highloadblock')) { ?>
<?
$arHLBlock = Bitrix\Highloadblock\HighloadBlockTable::getById(2)->fetch(); //Здесь ID Инфоблока
$obEntity = Bitrix\Highloadblock\HighloadBlockTable::compileEntity($arHLBlock);
$strEntityDataClass = $obEntity->getDataClass();
$resData = $strEntityDataClass::getList(array(
'select' => array('ID', "UF_SORT", "UF_LINK", "UF_LINK_ENG", "UF_IMG", "UF_IMG_ENG", "UF_ACTIVE"),//Поля созданные в HL инфоблоке
'filter' => array("UF_ACTIVE" => "1"), //Фильр по полю
'order' => array('UF_SORT' => 'ASC'), // Сортировка по полю
'limit' => 100,
));
while ($arItem = $resData->Fetch()) {
//ВЫВОД ДАННЫХ
}
?>
<?
}
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question