Django-cms div tags with cmsplugin class interfering with the slider

I am using Django CMS 3.0.3. I wrote a cms plugin with two derived CMSPluginBase classes, adding a slider to the placeholder and another to add slides as children to the slider.

In real time, everything works fine, but when I edit the content, I cannot use the slider. The reason is that django-cms decorates the html code with additional elements like this:

<div class="slider">
    <div class="cms_plugin cms_plugin-2" style="width: 0px; overflow: hidden; position: absolute; left: 0px; display: block;">
        <!-- Slider Item -->
        <div class="slider-item"> [MY SLIDER CONTENT] </div>
        <!-- /Slider Item --> 
    </div>
</div>

      

I got HTML / CSS / JS from someone else and I would rather not use another slider. What options should I solve this problem?

Is there a way in django-cms to turn off plugin wrapping in content mode only, but to enable placeholder in "structure mode" <div>

? It wouldn't be very convenient, but a workaround I can live with.

Is there something else I could do? I don't want to touch the slider itself. It might get an update and then I have to adjust it to adjust the slider again to my needs.

+3


source to share


1 answer


django-cms needs to wrap your plugin with a <div class="cms_plugin cms_plugin-2">

"framework mode" link. There are no other options.



+1


source







All Articles