Answer the question
In order to leave comments, you need to log in
How to make a condition for a section and its subsections?
Good afternoon.
I am already finishing work on an online store for 1C-Bitrix, I encountered such a problem as displaying a certain background for a certain section and its subsections.
Those. it is necessary to write a condition so that some text is displayed only on the pages of the section and its subsections.
Tried like this:
<?php if(CSite::InDir('/catalog/tovary_dlya_detey/')) { ?> style="background:url('<?=SITE_TEMPLATE_PATH?>/images/texture.png')"<?php } ?>
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