G
G
grinch_asd2018-09-26 16:46:30
1C-Bitrix
grinch_asd, 2018-09-26 16:46:30

Detailed news is not displayed in Bitrix?

Hello
The site has a "List of News" component. When you go to the news itself, for some reason, the sitemap is displayed and there is no "Change page" button in the admin panel. Manually created the detail.php file in the directory. In the component parameters, in the URL line of the detailed view, I registered detail.php?#ELEMENT_CODE#- in this case, when switching to the detailed news, it shows that the element was not found. The symbolic code of the element is registered in the admin panel. Tried to change to detail.php?#ID#, detail.php?#ELEMENT_ID#- element not found.
Tell me what could be the problem

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Ermilichev, 2018-09-26
@grinch_asd

In urlrewrite.php add

array(
    array(
        "CONDITION"   =>   "#^/какая_директория/([a-zA-Z0-9\\.\\-_]+)/?.*#",
      "RULE"   =>   "ELEMENT_CODE=$1",
      "PATH"   =>   "/какая_директория/detail.php",
      ),
);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question