J
J
Jupiter Max2020-04-13 15:14:34
1C-Bitrix
Jupiter Max, 2020-04-13 15:14:34

How to make a detail page without a component?

Hello. The question is.

I have an hl block that stores images and titles. On the page I want to display a list by type of news - picture, title. By clicking, we go to the detailed page of each element. How to implement detailed without using news component?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2020-04-14
@AlexeyCaTHaR

For example, you have a directory = colors. Inside index.php for the list and detail.php for the detail page.
1) Implement CNC. (urlrewrite.php for help) something like this:

$arUrlRewrite[] = [
    "CONDITION" => "#^/colors/([0-9]+)/.*#",
    "RULE" => "id=\$1",
    "ID" => "",
    "PATH" => "/colors/detail.php",
];

The index page will open itself, and if the url matches the conditions, then the detailed one will open
2) on the pages you call your list and element components from the hl-block

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question