T
T
tgarl2021-06-03 11:30:57
1C-Bitrix
tgarl, 2021-06-03 11:30:57

How to combine owl-carousel composite site?

There is a Related Products component, Recently Viewed and a number of others throughout the site.
The template is tied with an owl-carousel.

The carousel itself and the settings are connected in the footer.
When you turn on the composite mode, the entire carousel falls apart, because the area is dynamic and, according to the rules of the composite, there is a background request for the content, and there is no longer a reload of owl, the original tags are loaded accordingly, and not adapted by the carousel.

How to deal with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tgarl, 2021-06-03
@tgarl

Here you are looking for, looking for a solution, you just have to ask a question and it is right there.
in general, for such things, you can either wrap the area with scripts in dynamics, or add a call to the template

if (window.frameCacheVars !== undefined) 
{
        BX.addCustomEvent("onFrameDataReceived" , function(json) {
             //тут наш вызов
         }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question