Answer the question
In order to leave comments, you need to log in
Displaying not one, but two or more elements of the Contacts infoblock in Bitrix?
There are two elements in the Contacts infoblock in the admin panel (head office and branch), and on the site in the "contacts" only one is displayed - the branch.
How to get them both out? Which way to look? Element ID, character code?
Thank you.
Answer the question
In order to leave comments, you need to log in
Look at the code - it will help 100% ;-)
Well, if we talk about infoblocks, then we should rather look towards "activity".
Yes, there the developers of the template were smart to see - the contacts consist of two parts: on the left - it outputs something like bitrix:news.list, on the right - a custom bizsolutions:main.feedback
code that displays contacts, as far as I understand:
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetPageProperty("TITLE", "Контакты");
$APPLICATION->SetTitle("Контакты");
?><section class="content">
<div class="container">
<div class="row">
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"contacts",
Array(
"ACTIVE_DATE_FORMAT" => "",
"ADD_SECTIONS_CHAIN" => "N",
"AJAX_MODE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "A",
"CHECK_DATES" => "Y",
"DETAIL_URL" => "",
"DISPLAY_BOTTOM_PAGER" => "N",
"DISPLAY_DATE" => "Y",
"DISPLAY_NAME" => "Y",
"DISPLAY_PICTURE" => "Y",
"DISPLAY_PREVIEW_TEXT" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"FIELD_CODE" => array("",""),
"FILTER_NAME" => "",
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"IBLOCK_ID" => getIBlockIdByCode("contacts"),
"IBLOCK_TYPE" => "general_information",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"INCLUDE_SUBSECTIONS" => "Y",
"MESSAGE_404" => "",
"NEWS_COUNT" => "1",
"PAGER_BASE_LINK_ENABLE" => "N",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "N",
"PAGER_SHOW_ALWAYS" => "N",
"PAGER_TEMPLATE" => "",
"PAGER_TITLE" => "Новости",
"PARENT_SECTION" => "",
"PARENT_SECTION_CODE" => "",
"PREVIEW_TRUNCATE_LEN" => "",
"PROPERTY_CODE" => array("","ADDRESS","EMAIL","PHONE_NUMBER",""),
"SET_BROWSER_TITLE" => "N",
"SET_LAST_MODIFIED" => "N",
"SET_META_DESCRIPTION" => "Y",
"SET_META_KEYWORDS" => "Y",
"SET_STATUS_404" => "N",
"SET_TITLE" => "N",
"SHOW_404" => "N",
"SORT_BY1" => "",
"SORT_BY2" => "",
"SORT_ORDER1" => "",
"SORT_ORDER2" => ""
)
);?> <?$APPLICATION->IncludeComponent(
"bizsolutions:main.feedback",
"contacts_feedback",
array(
"COMPONENT_TEMPLATE" => "contacts_feedback",
"EMAIL_TO" => "[email protected]",
"EVENT_MESSAGE_ID" => array(
0 => "7",
),
"OK_TEXT" => "Спасибо, ваше сообщение принято.",
"REQUIRED_FIELDS" => array(
0 => "NAME",
1 => "EMAIL",
2 => "MESSAGE",
),
"USE_CAPTCHA" => "Y"
),
false
);?>
</div>
<!-- end row -->
</div>
<!-- end container --> </section> <br><?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question