Answer the question
In order to leave comments, you need to log in
How to find out that we are in the product card of the catalog component?
Hello.
Can you please tell me if Bitrix has the ability to determine the product card page?
In the design, on all pages except this one, the container is the main standard (bootstrap .conainer), and in the full-width card (.container-fluid). I don't want to tear out the content width part from the header.
Answer the question
In order to leave comments, you need to log in
Do through the deferred functions
in footer.php at the end we write a function that, depending on the conditions, performs the actions we need
function containerWidth() {
global $APPLICATION;
ob_start();
if(strlen($APPLICATION->GetProperty('fullWidthContainer')) > 0) {
echo 'container-fluid';
} else {
echo 'container';
}
$result = ob_get_contents();
ob_end_clean();
return $result;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question