Answer the question
In order to leave comments, you need to log in
How to display an infoblock on a specific page of the Bitrix section?
Hello.
I have a "Specialists" section. It has subsections with added elements.
Task: Show specialists exactly on the elements (that is, pages), and not in sections and subsections.
Since I have a place for this functionality in the header, I display them with a check on the section
The problem is that in the "Specialists" section there are "Narrow specialists" and it has a bunch of subsections "Specialist 1", "Specialist 2" and etc. + they are always added. Accordingly, my check clings only to the main service section.
The question is how to check for a specific specialist in the main section, given that their list is displayed in the header, and not on a specific page.
Thanks in advance if(CSite::InDir('/service')):
Answer the question
In order to leave comments, you need to log in
if(substr_count('/service',$APPLICATION->GetCurDir())):
you can add a rule to $urlrewrite that will pass the specialist ID to the request $_REQUEST['PERSON_ID']
array(
"CONDITION" => "#^/service/.+?/([^\/]+)/#",
"RULE" => "PERSON_ID=\$1",
"ID" => "",
"PATH" => "/service/index.php",
),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question