N
N
ne_pes2019-11-06 01:40:47
1C-Bitrix
ne_pes, 2019-11-06 01:40:47

How to make the url of the Bitrix infoblock element according to its symbolic code?

Now the URL is: http:/site.ru/decision/detail.php?ID=59〈=ru
You need to make it normal: http:/site.ru/decision/element/
5dc1fa470381b999453413.png
detail.php:

<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Title");
?><?$APPLICATION->IncludeComponent(
  "site:news.detail",
  "decision",
  Array(
    "ACTIVE_DATE_FORMAT" => "d.m.Y",
    "ADD_ELEMENT_CHAIN" => "N",
    "ADD_SECTIONS_CHAIN" => "Y",
    "AJAX_MODE" => "N",
    "AJAX_OPTION_ADDITIONAL" => "",
    "AJAX_OPTION_HISTORY" => "N",
    "AJAX_OPTION_JUMP" => "N",
    "AJAX_OPTION_STYLE" => "Y",
    "BROWSER_TITLE" => "-",
    "CACHE_GROUPS" => "Y",
    "CACHE_TIME" => "36000000",
    "CACHE_TYPE" => "A",
    "CHECK_DATES" => "Y",
    "DETAIL_URL" => "",
    "DISPLAY_BOTTOM_PAGER" => "Y",
    "DISPLAY_DATE" => "Y",
    "DISPLAY_NAME" => "Y",
    "DISPLAY_PICTURE" => "Y",
    "DISPLAY_PREVIEW_TEXT" => "Y",
    "DISPLAY_TOP_PAGER" => "N",
    "ELEMENT_CODE" => "",
    "ELEMENT_ID" => $_REQUEST["ID"],
    "FIELD_CODE" => array("",""),
    "IBLOCK_ID" => "3",
    "IBLOCK_TYPE" => "content",
    "IBLOCK_URL" => "",
    "INCLUDE_IBLOCK_INTO_CHAIN" => "Y",
    "MESSAGE_404" => "",
    "META_DESCRIPTION" => "-",
    "META_KEYWORDS" => "-",
    "PAGER_BASE_LINK_ENABLE" => "N",
    "PAGER_SHOW_ALL" => "N",
    "PAGER_TEMPLATE" => ".default",
    "PAGER_TITLE" => "Страница",
    "PROPERTY_CODE" => array("",""),
    "SET_BROWSER_TITLE" => "Y",
    "SET_CANONICAL_URL" => "N",
    "SET_LAST_MODIFIED" => "N",
    "SET_META_DESCRIPTION" => "Y",
    "SET_META_KEYWORDS" => "Y",
    "SET_STATUS_404" => "N",
    "SET_TITLE" => "Y",
    "SHOW_404" => "N",
    "STRICT_SECTION_CHECK" => "N",
    "USE_PERMISSIONS" => "N",
    "USE_SHARE" => "N"
  )
);?><?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mills, 2019-11-06
@mills

Enable in the output settings of the component "Enable CNC support" CNC
directory (relative to the site root): /decision/
Detailed view page: #ELEMENT_CODE#/

A
Alexander, 2019-11-06
Madzhugin @Suntechnic

Change the URL of the detailed view page to "#SITE_DIR#/decision/#CODE#/"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question