Answer the question
In order to leave comments, you need to log in
How to display infoblock sections by virtual URLs?
There is an infoblock with its own sections (output code at the very end):
I need to display everything in the same way, only from another infoblock:
What do I need to change here besides the ID?
Code for displaying sections of the first infoblock:
<?$APPLICATION->IncludeComponent("bitrix:news", "services", array(
"IBLOCK_TYPE" => "aspro_allcorp_content",
"IBLOCK_ID" => "28",
"NEWS_COUNT" => "20",
"USE_SEARCH" => "N",
"USE_RSS" => "N",
"USE_RATING" => "N",
"USE_CATEGORIES" => "N",
"USE_FILTER" => "Y",
"FILTER_NAME" => "arrFilter",
"FILTER_FIELD_CODE" => array(
0 => "",
1 => "",
),
"FILTER_PROPERTY_CODE" => array(
0 => "",
1 => "",
),
"SORT_BY1" => "SORT",
"SORT_ORDER1" => "ASC",
"SORT_BY2" => "ID",
"SORT_ORDER2" => "DESC",
"CHECK_DATES" => "Y",
"SEF_MODE" => "Y",
"SEF_FOLDER" => "/proiz/",
"AJAX_MODE" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "100000",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"SET_TITLE" => "Y",
"SET_STATUS_404" => "Y",
"SHOW_404" => "Y",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"ADD_SECTIONS_CHAIN" => "Y",
"USE_PERMISSIONS" => "N",
"PREVIEW_TRUNCATE_LEN" => "",
"LIST_ACTIVE_DATE_FORMAT" => "d.m.Y",
"LIST_FIELD_CODE" => array(
0 => "NAME",
1 => "PREVIEW_TEXT",
2 => "PREVIEW_PICTURE",
3 => "",
),
"LIST_PROPERTY_CODE" => array(
0 => "",
1 => "",
),
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"DISPLAY_NAME" => "N",
"META_KEYWORDS" => "-",
"META_DESCRIPTION" => "-",
"BROWSER_TITLE" => "-",
"DETAIL_ACTIVE_DATE_FORMAT" => "d.m.Y",
"DETAIL_FIELD_CODE" => array(
0 => "DETAIL_TEXT",
1 => "DETAIL_PICTURE",
2 => "",
),
"DETAIL_PROPERTY_CODE" => array(
0 => "LINK_GOODS",
1 => "LINK_STAFF",
2 => "LINK_REVIEWS",
3 => "LINK_PROJECTS",
4 => "FORM_ORDER",
5 => "FORM_QUESTION",
6 => "DOCUMENTS",
7 => "PHOTOS",
8 => "",
),
"DETAIL_DISPLAY_TOP_PAGER" => "N",
"DETAIL_DISPLAY_BOTTOM_PAGER" => "Y",
"DETAIL_PAGER_TITLE" => "Страница",
"DETAIL_PAGER_TEMPLATE" => "",
"DETAIL_PAGER_SHOW_ALL" => "Y",
"PAGER_TEMPLATE" => ".default",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "Y",
"PAGER_TITLE" => "Новости",
"PAGER_SHOW_ALWAYS" => "N",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "N",
"IMAGE_POSITION" => "left",
"USE_SHARE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"SEF_URL_TEMPLATES" => array(
"news" => "",
"section" => "#SECTION_CODE_PATH#/",
"detail" => "#SECTION_CODE_PATH#/#ELEMENT_CODE#/",
)
),
false
);?>
Answer the question
In order to leave comments, you need to log in
These parameters must be adjusted to the structure of a particular infoblock.
urls do not work most likely because "SEF_FOLDER" => "/proiz/" set the correct value.
"IBLOCK_TYPE" => "aspro_allcorp_content",
"IBLOCK_ID" => "28",
"FILTER_NAME" => "arrFilter",
"SEF_URL_TEMPLATES" => array(
"news" => "",
"section" => "#SECTION_CODE_PATH#/",
"detail" => "#SECTION_CODE_PATH#/#ELEMENT_CODE#/",
)
"SEF_FOLDER" => "/proiz/",
"DETAIL_PROPERTY_CODE" => array(
0 => "LINK_GOODS",
1 => "LINK_STAFF",
2 => "LINK_REVIEWS",
3 => "LINK_PROJECTS",
4 => "FORM_ORDER",
5 => "FORM_QUESTION",
6 => "DOCUMENTS",
7 => "PHOTOS",
8 => "",
),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question