Answer the question
In order to leave comments, you need to log in
CSite::InDir for section subsections?
Good afternoon.
I want to display certain information in header.php for a category and all its attachments (subcategories, subsubcategories).
I did it via CSite::InDir:
if(CSite::InDir('/catalog/odejda/')) {
echo "Lorem Ipsum";
} else {
echo "Muspi Merol"
}
Answer the question
In order to leave comments, you need to log in
add properties for the section, in which to push the necessary info/image, in the component via result_modifier.php get this data via CIBlockSection::GetList, buffer, output via deferred functions in the header
for subsections, the parent can be obtained via = CIBlockSection::GetNavChain
then like this select properties from the parent and as described above
Лучше использовать Отложенные функции
В component_epilog.php определяешь как и что выводить. Определяешь свойство страницы через SetPageProperty и через
Выводишь то что нужно.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question