Код |
---|
<?$APPLICATION->IncludeComponent("bitrix:photo.sections.top", ".default", array( "IBLOCK_TYPE" => "gallery", "IBLOCK_ID" => "9", "SECTION_SORT_FIELD" => "sort", "SECTION_SORT_ORDER" => "asc", "ELEMENT_SORT_FIELD" => "sort", "ELEMENT_SORT_ORDER" => "asc", "FILTER_NAME" => "arrFilter", "FIELD_CODE" => array( 0 => "", 1 => "DETAIL_PICTURE", 2 => "", ), "PROPERTY_CODE" => array( 0 => "", 1 => "", ), "SECTION_COUNT" => "20", "ELEMENT_COUNT" => "9", "LINE_ELEMENT_COUNT" => "3", "SECTION_URL" => "", "DETAIL_URL" => "", "CACHE_TYPE" => "A", "CACHE_TIME" => "3600", "CACHE_FILTER" => "N", "DISPLAY_PANEL" => "N" ), false );?> |
Код |
---|
<a target = "_blank" href="<?=$arItem["DETAIL_PICTURE"]["SRC"]?>"> <img border="0" src="<?=$arItem["PICTURE"]["SRC"]?>" width="<?=$arItem["PICTURE"]["WIDTH"]?>" height="<?=$arItem["PICTURE"]["HEIGHT"]?>" alt="<?=$arItem["PICTURE"]["DESCRIPTION"]?>" title="<?=$arItem["NAME"]?>" /> </a> |
Код |
---|
<?$APPLICATION->IncludeComponent( "bitrix:photo.sections.top", "", Array( "IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"], "IBLOCK_ID" => $arParams["IBLOCK_ID"], "SECTION_COUNT" => $arParams["SECTION_COUNT"], "ELEMENT_COUNT" => $arParams["TOP_ELEMENT_COUNT"], "LINE_ELEMENT_COUNT" => $arParams["TOP_LINE_ELEMENT_COUNT"], "SECTION_SORT_FIELD" => $arParams["SECTION_SORT_FIELD"], "SECTION_SORT_ORDER" => $arParams["SECTION_SORT_ORDER"], "ELEMENT_SORT_FIELD" => $arParams["TOP_ELEMENT_SORT_FIELD"], "ELEMENT_SORT_ORDER" => $arParams["TOP_ELEMENT_SORT_ORDER"], "FIELD_CODE" => $arParams["TOP_FIELD_CODE"], "PROPERTY_CODE" => $arParams["TOP_PROPERTY_CODE"], "DISPLAY_PANEL" => $arParams["DISPLAY_PANEL"], "SET_TITLE" => $arParams["SET_TITLE"], "USE_PERMISSIONS" => $arParams["USE_PERMISSIONS"], "GROUP_PERMISSIONS" => $arParams["GROUP_PERMISSIONS"], "CACHE_TYPE" => $arParams["CACHE_TYPE"], "CACHE_TIME" => $arParams["CACHE_TIME"], "SECTION_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["section"], "DETAIL_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["detail"], ), $component ); ?> |
Код |
---|
<?$APPLICATION->IncludeComponent( "bitrix:photo.sections.top", "", Array( "IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"], "IBLOCK_ID" => $arParams["IBLOCK_ID"], "SECTION_COUNT" => $arParams["SECTION_COUNT"], "ELEMENT_COUNT" => $arParams["TOP_ELEMENT_COUNT"], "LINE_ELEMENT_COUNT" => $arParams["TOP_LINE_ELEMENT_COUNT"], "SECTION_SORT_FIELD" => $arParams["SECTION_SORT_FIELD"], "SECTION_SORT_ORDER" => $arParams["SECTION_SORT_ORDER"], "ELEMENT_SORT_FIELD" => $arParams["TOP_ELEMENT_SORT_FIELD"], "ELEMENT_SORT_ORDER" => $arParams["TOP_ELEMENT_SORT_ORDER"], "FIELD_CODE" => array( 0 => "", 1 => "DETAIL_PICTURE", 2 => "", ), #$arParams["TOP_FIELD_CODE"], "PROPERTY_CODE" => $arParams["TOP_PROPERTY_CODE"], "DISPLAY_PANEL" => $arParams["DISPLAY_PANEL"], "SET_TITLE" => $arParams["SET_TITLE"], "USE_PERMISSIONS" => $arParams["USE_PERMISSIONS"], "GROUP_PERMISSIONS" => $arParams["GROUP_PERMISSIONS"], "CACHE_TYPE" => $arParams["CACHE_TYPE"], "CACHE_TIME" => $arParams["CACHE_TIME"], "SECTION_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["section"], "DETAIL_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["detail"], ), $component ); ?> |
Цитата |
---|
Евгений Бескровный пишет:
Только вот код вызова там отличается от того что вы привели, там вместо параметров полсе знака =>, стоит одна переменная везде, можете пояснить пожалуйста, то ли я нашел, и если да, то как будет правильней добавить туда поле "детальная картинка", и почему у меня везде стоит переменная $arParams, а у вас значения? |
Код |
---|
<a target = "_blank" href="<?=$arItem["PICTURE"]["SRC"]?>"> <img border="0" src="<?=$arItem["PICTURE"]["SRC"]?>" width="<?=$arItem["PICTURE"]["WIDTH"]?>" height="<?=$arItem["PICTURE"]["HEIGHT"]?>" alt="<?=$arItem["PICTURE"]["DESCRIPTION"]?>" title="<?=$arItem["NAME"]?>" /> </a> |
Код |
---|
<?$APPLICATION->IncludeComponent("bitrix:photo", "tmplt_photo", array( "IBLOCK_TYPE" => "gallery", "IBLOCK_ID" => "9", "SEF_MODE" => "N", "SEF_FOLDER" => "/automated_accounting_system/photo_gallery/", "AJAX_MODE" => "N", "AJAX_OPTION_SHADOW" => "Y", "AJAX_OPTION_JUMP" => "N", "AJAX_OPTION_STYLE" => "Y", "AJAX_OPTION_HISTORY" => "N", "CACHE_TYPE" => "A", "CACHE_TIME" => "3600", "CACHE_FILTER" => "N", "DISPLAY_PANEL" => "N", "SET_TITLE" => "Y", "SET_STATUS_404" => "N", "USE_PERMISSIONS" => "N", "USE_RATING" => "N", "USE_REVIEW" => "N", "USE_FILTER" => "N", "SECTION_COUNT" => "20", "TOP_ELEMENT_COUNT" => "9", "TOP_LINE_ELEMENT_COUNT" => "2", "SECTION_SORT_FIELD" => "sort", "SECTION_SORT_ORDER" => "asc", "TOP_ELEMENT_SORT_FIELD" => "sort", "TOP_ELEMENT_SORT_ORDER" => "asc", "TOP_FIELD_CODE" => array( 0 => "", 1 => "", ), "TOP_PROPERTY_CODE" => array( 0 => "", 1 => "", ), "SECTION_PAGE_ELEMENT_COUNT" => "20", "SECTION_LINE_ELEMENT_COUNT" => "2", "ELEMENT_SORT_FIELD" => "sort", "ELEMENT_SORT_ORDER" => "asc", "LIST_FIELD_CODE" => array( 0 => "", 1 => "", ), "LIST_PROPERTY_CODE" => array( 0 => "", 1 => "", ), "META_KEYWORDS" => "-", "META_DESCRIPTION" => "-", "DETAIL_FIELD_CODE" => array( 0 => "", 1 => "", ), "DETAIL_PROPERTY_CODE" => array( 0 => "", 1 => "", ), "DISPLAY_TOP_PAGER" => "N", "DISPLAY_BOTTOM_PAGER" => "Y", "PAGER_TITLE" => "Фотографии", "PAGER_SHOW_ALWAYS" => "Y", "PAGER_TEMPLATE" => "", "PAGER_DESC_NUMBERING" => "N", "PAGER_DESC_NUMBERING_CACHE_TIME" => "36000", "AJAX_OPTION_ADDITIONAL" => "", "VARIABLE_ALIASES" => array( "SECTION_ID" => "SECTION_ID", "ELEMENT_ID" => "ELEMENT_ID", ) ), false );?> |
Код |
---|
"FIELD_CODE" => array( 0 => "", 1 => "DETAIL_PICTURE", 2 => "", ), |
Код |
---|
"TOP_FIELD_CODE" => array( 0 => "", 1 => "", ), |
Код |
---|
"TOP_FIELD_CODE" => array( 0 => "", 1 => "DETAIL_PICTURE", 2 => "", ), |
Цитата |
---|
Дмитрий Яковенко пишет:
Поправьте шаблон нужного компонента, чтобы он не выводил дополнительные поля (вообще или только детальную картинку), так как эта функция шаблона, как я понял, не нужна. |
Код |
---|
<?foreach($arParams["FIELD_CODE"] as $code):?> <small><?=GetMessage("IBLOCK_FIELD_".$code)?> : <?=$arItem[$code]?></small><br /> <?endforeach?> |