K
K
kimqar1232021-04-14 14:20:08
1C-Bitrix
kimqar123, 2021-04-14 14:20:08

Bitrix How to set specific infoblock ID for search (Search.Page)?

I have a standard search component on the page, how can I make this search display results only in a certain infoblock? (now he searches for all infoblocks on the site)

<?$APPLICATION->IncludeComponent(
  "bitrix:search.page",
  "SEARCH",
  array(
    "RESTART" => "N",
    "CHECK_DATES" => "N",
    "USE_TITLE_RANK" => "N",
    "DEFAULT_SORT" => "rank",
    "arrFILTER_iblock_administration" => array(0=>"3",),
    "arrFILTER" => array(0=>"iblock_administration",),
    "SHOW_WHERE" => "N",
    "SHOW_WHEN" => "N",
    "PAGE_RESULT_COUNT" => "5",
    "AJAX_MODE" => "N",
    "AJAX_OPTION_SHADOW" => "Y",
    "AJAX_OPTION_JUMP" => "N",
    "AJAX_OPTION_STYLE" => "Y",
    "AJAX_OPTION_HISTORY" => "N",
    "CACHE_TYPE" => "A",
    "CACHE_TIME" => "36000000",
    "DISPLAY_TOP_PAGER" => "N",
    "DISPLAY_BOTTOM_PAGER" => "Y",
    "PAGER_TITLE" => "Результаты поиска",
    "PAGER_SHOW_ALWAYS" => "N",
    "PAGER_TEMPLATE" => "arrows",
    "USE_SUGGEST" => "N",
    "SHOW_ITEM_TAGS" => "N",
    "SHOW_ITEM_DATE_CHANGE" => "N",
    "SHOW_ORDER_BY" => "N",
    "SHOW_TAGS_CLOUD" => "N",
    "AJAX_OPTION_ADDITIONAL" => "",
    "COMPONENT_TEMPLATE" => "SEARCH",
    "NO_WORD_LOGIC" => "N",
    "FILTER_NAME" => "",
    "USE_LANGUAGE_GUESS" => "N",
    "SHOW_RATING" => "",
    "RATING_TYPE" => "",
    "PATH_TO_USER_PROFILE" => ""
  ),
  false
);?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Gritsuk, 2021-04-14
@kimqar123

Open component settings. There will be a Search area limitation parameter
https://dev.1c-bitrix.ru/user_help/components/sluz...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question