P
P
Pavel Sidorov2021-07-15 10:31:17
1C-Bitrix
Pavel Sidorov, 2021-07-15 10:31:17

Why doesn't the component render?

friends. I'm doing a crutch, because the structure of the site is not very correct.

in general, on the page of the catalog section in the epilogue component, I set the value of the property to "3"

$APPLICATION->SetPageProperty('section_list2', 3 );


ps I can't link to the catalog page because there is no physical folder)

Next, in the template, I want to display breadcrumbs for catalog pages in a slightly different form. Therefore, I make a delayed function, but it does not display the component for me. Why?

<?php function Showbreth()
        { 
          global $APPLICATION;
            ob_start();

            if($APPLICATION->GetProperty('section_list2') > 2) {
              //echo 'done!';
              $APPLICATION->IncludeComponent(
              "bitrix:breadcrumb",
              "template",
                Array(
                  "PATH" => "",
                  "SITE_ID" => "s1",
                  "START_FROM" => "0"
                )
              );
            }
            else {

            }
            $breth = ob_get_contents();
            ob_end_clean();
            return $breth;
        } 
    ?>
        
    <?$APPLICATION->AddBufferContent("Showtest");?>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question