Answer the question
In order to leave comments, you need to log in
How to configure CNC for bitrix:catalog so that the URL of the product card is without a section and without a slash at the end?
Greetings. Please help.
The address structure is as follows:
the directory section contains the entire nesting chain, i.e., for example, site.ru/catalog/sukhofrukty/ananas/
respectively, in the component in the "SEF_URL_TEMPLATES" section we write "section" => "#SECTION_CODE_PATH#/" , everything is clear
here, but the address of the product card should be like this: site.ru/catalog/sushenyy-ananas , i.e. no sections, just a symbolic product code, but without a slash at the end
in the component settings, I wrote "element" => "#ELEMENT_CODE#" without a slash
, if you put a slash at the end, then everything works, but if you don't use a slash at the end, then enters the product card,site.ru/catalog/ - the error
got into the component itself in the component.php file - there the required page is connected with the line
$this->IncludeComponentTemplate($componentPage);
and when going to /catalog/ the $componentPage variable is equal to "element" although it should be "sections"
i.e. the component thinks that we are moving to a detailed card, when we access the directory root
, I suspect that it's all about the slash
, how to be, display the component in its own namespace and customize it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question