Y
Y
Yuri Voronin2020-07-02 21:12:04
1C-Bitrix
Yuri Voronin, 2020-07-02 21:12:04

How to properly set up the CNC for a catalog?

Good afternoon.
There is a directory structure in IB:

- Section 1
---- Section 1.1
-------- Element 1.1.1
-------- Element 1.1.2
---- Section 1.2
----- --- Element 1.2.1
- Section 2
---- Section 2.1 The

complex CNC catalog component is used:

"SEF_URL_TEMPLATES" => Array(
    "element"=>"#SECTION_CODE#/#ELEMENT_CODE#/",
    "section"=>"#SECTION_CODE#/",
    "sections"=>"",
    "smart_filter"=>"#SECTION_CODE#/filter/#SMART_FILTER_PATH#/apply/"
),

Still used It turns out that if I go to the site by /catalog/Section 1/ then I will display all the elements from the nested sections. This is how it should be, but here the url of the elements is /catalog/Section 1/Element 1.1.1/ . And I need /catalog/Section 1.1/Element 1.1.1/ . Those. so that the section in the url is the one in which the element is located directly. How can this be implemented?
"INCLUDE_SUBSECTIONS" => "Y",



Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Emelyanov, 2020-07-07
@babarun

You need to set the main section for the elements. See https://dev.1c-bitrix.ru/learning/course/?COURSE_I...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question