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
| $numItems = count($arr); | |
| $i = 0; | |
| foreach($arr as $key=>$value) { | |
| if(++$i === $numItems) { | |
| echo "last index!"; | |
| } | |
| } |
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
| require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
| CModule::IncludeModule("iblock"); |
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
| <div class="case_pagination"> | |
| <? | |
| $arSelect = Array("ID","NAME", "DETAIL_PAGE_URL"); | |
| $arFilter = Array("IBLOCK_ID"=>$arResult["IBLOCK_ID"], "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y", "SECTION_ID"=>$arResult['IBLOCK_SECTION_ID']); | |
| $res = CIBlockElement::GetList(Array("active_from"=>"ASC"), $arFilter, false, Array("nPageSize"=>1,"nElementID"=>$arResult['ID']), $arSelect); | |
| while($ob = $res->GetNext()){ | |
| $links[]=$ob; | |
| } | |
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
| $photo_src = CFile::GetPath(IMAGE_ID); |
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
| array( | |
| "CONDITION" => "#^/cases/(.+?)/.*#", | |
| "RULE" => "ELEMENT_CODE=$1", | |
| "PATH" => "/cases/detail.php", | |
| ), | |
| Detail page url in infoblock settings: | |
| #SITE_DIR#/cases/#ELEMENT_CODE#/ | |
| bitrix:news.detail parameter: |
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
| function ShowBreadcrumbs(){ | |
| global $APPLICATION; | |
| return $APPLICATION->GetProperty("show_breadcrumbs"); | |
| } | |
| $APPLICATION->AddBufferContent("ShowBreadcrumbs"); |
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
| $width_height_arr = array('width' => 465, 'height' => 510); | |
| $file = CFile::ResizeImageGet($arItem["DETAIL_PICTURE"], $width_height_arr, BX_RESIZE_IMAGE_EXACT, true); |
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
| $image = CFile::GetFileArray($arItem["DETAIL_PICTURE"]); |
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(CModule::IncludeModule("iblock")) | |
| { | |
| // выберем 3 элемента типа "cases" из нескольких информационных блоков (16, 17) | |
| $items = GetIBlockElementListEx("cases", array(16, 17), Array(), | |
| Array("DATE_ACTIVE_FROM"=>"DESC", "SORT"=>"ASC", "NAME" => "ASC"), 3); | |
| // постраничная навигация | |
| $items->NavPrint("Новости компании"); | |
| // цикл по всем новостям | |
| while($arItem = $items->GetNext()) |
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
| background-image: linear-gradient(to right, #333 10%, rgba(255, 255, 255, 0) 0%); | |
| background-position: bottom; | |
| background-size: 10px 1px; | |
| background-repeat: repeat-x; |