Answer the question
In order to leave comments, you need to log in
How to write a condition for a directory?
Hello.
Right now I'm using one text for the main page and another for everyone else.
Now I need to use specific text for the catalog section pages.
Those. when we are on a page with a list of products of a section or subsection, I want to write a specific div with text.
However, if we are on a comparison page or a product card, then use the text "internal".
More or less like this:
<?php if ($GLOBALS["APPLICATION"] -> GetCurDir() == "/") { ?>
главная
<?php } elseif (условие) { ?>
страница раздела
<?php } else { ?>
внутренние
<?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