K
K
kapai692015-05-29 07:16:05
1C-Bitrix
kapai69, 2015-05-29 07:16:05

Butrix CNC for a catalog?

There is a news infoblock, at
/news/
there is a section sports
/news/sport/
aka #SECTION_CODE#
For a detailed view of the page, I have it set up like this #SECTION_CODE
#/"ELEMENT_CODE"
was displayed at
/news/news_name.html
That is, it triggered
#IBLOCK_CODE#/"ELEMENT_CODE"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Timofey, 2015-05-29
@mr_T

If I remember correctly, then Bitrix will give you a URL when you select which one you need, that is, it will simply omit the section.
And if you want to process such urls correctly, you will have to manually write a complex component that will check the number of parameters passed in the url and, if there is one, check whether it is an element code or a section code. At the same time, you still need to monitor the uniqueness of such codes. In short, it seems to me that it is not worth it, it is better to make links like news/item/#CODE# for elements and news/#CODE# for sections and not take a steam bath.

A
Alex Khizhniy, 2015-07-22
@mendler

No way, add a complex component to recognize the difference between #SECTION_CODE# and #ELEMENT_CODE#

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question