This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TasksReports | |
{ | |
const IBLOCK_ID = 33; | |
const DEPARTMENT_IBLOCK_ID = 5; | |
public function getTaskList ($page, $filter) | |
{ | |
global $USER; | |
$arFilterCustom = self::buildFilter($filter); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wrap = document.getElementById("pagetitle-menu"); | |
var addButtonMore = BX.create("span", { | |
props: {className: "ui-btn-double ui-btn-primary ui-btn-primary_custom"}, | |
children: [ | |
BX.create("button", { | |
props: {className: "ui-btn-main", type: "button"}, | |
html: 'Действия', | |
events: {click: BX.proxy(this.addEntry, this)} | |
}) | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?if (!empty($arResult["PROPERTIES"]["MORE_PHOTO"]["VALUE"])):?> | |
<?foreach($arResult["PROPERTIES"]["MORE_PHOTO"]["VALUE"] as $photo):?> | |
<img src="<?=CFile::GetPath($photo)?>" /> | |
<?endforeach?> | |
<?endif?> | |
//Пояснения: MORE_PHOTO — это код нашего свойства информационного блока в Битрикс. GetPath это метод класса CFile, который просто возвращает путь к нашему изображению — зарегистрированному файлу. И выводить элементы лучше из массива $arResult[«DISPLAY_PROPERTIES»] — давайте уважать редакторов контента =) | |
//Если нам нужно сразу отмасштабировать изображение… |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//==============================================// | |
// Показывать все свойства в DISPLAY_PROPERTIES // | |
//==============================================// | |
$arResult["DISPLAY_PROPERTIES"] = array(); | |
foreach ($arResult["PROPERTIES"] as $pid => &$arProp) | |
{ | |
// Не выводим для просмотра свойства с сортировкой мнеьше 0 (они будут у нас служебными) | |
if ($arProp["SORT"] < 0) | |
continue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// текущая страница: /ru/?id=3&s=5 | |
$page = $APPLICATION->GetCurPage(); // результат - /ru/index.php | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$arResult['SECTION_ID'] = CIBlockFindTools::GetSectionID( $arResult['VARIABLES']['SECTION_ID'], $arResult['VARIABLES']['SECTION_CODE'], array('IBLOCK_ID' => $arParams['IBLOCK_ID']) ); | |
$res = CIBlockSection::GetByID($arResult['SECTION_ID']); | |
if($ar_res = $res->GetNext()) | |
echo $ar_res['NAME']; |