Answer the question
In order to leave comments, you need to log in
How to determine that you are on the detailed page of the catalog?
Good day!
Is it possible to determine in the header that you are on the detailed page of the catalog?
Answer the question
In order to leave comments, you need to log in
In general, we got such a "crutch":
public static function isSectionInCatalog($iblockID, $url) {
$code = array_pop(array_filter(explode( '/', $url)));
$arFilter = array("IBLOCK_ID"=>$iblockID, "CODE" => $code);
$rsSections = CIBlockSection::GetList(array(),array('IBLOCK_ID' => $iblockID, '=CODE' => $code));
return ($rsSections->Fetch() !== false);
}
in component_epilog write the desired checkbox to the global variable or page property
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question