J
J
JohnxFFF2019-08-19 11:56:32
1C-Bitrix
JohnxFFF, 2019-08-19 11:56:32

Non-cached area in bitrix component template?

Good afternoon, how to display the dynamic part in the news.list/detail component template?
Tried like this, component template:

...
<?\Bitrix\Main\Page\Frame::getInstance()->startDynamicWithID("area");?>
<?=getPrice(...);?> // но этот код все равно кешируется
<?\Bitrix\Main\Page\Frame::getInstance()->finishDynamicWithID("area", "");?>
...

Tell me how to do without the output buffer and work with it, if possible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2019-08-20
@anton99zel

<!--Скрытый див, где-то на странице.-->
   <div style="display: none;" id="from"><?=getPrice(...);?></div>
        ...  
   <!--пустой див в закэшированном компонете-->
   <div style="display: block;" id="to"></div>    
    <script type="text/JavaScript">        
        document.getElementById('to').innerHTML = document.getElementById('from').innerHTML;
    </script>

Or:
marketplace.1c-bitrix.ru/solutions/askaron.include

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question