W
W
wagwandude2016-06-11 07:32:09
PHP
wagwandude, 2016-06-11 07:32:09

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 } ?>


Thank you in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
no_one_safe, 2016-06-11
@no_one_safe

CSite::InDir

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question