Answer the question
In order to leave comments, you need to log in
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", "");?>
...
Answer the question
In order to leave comments, you need to log in
<!--Скрытый див, где-то на странице.-->
<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>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question