madeyourday / contao-rocksolid-slider

RockSolid Slider Contao Extension
http://rocksolidthemes.com/de/contao/plugins/responsive-slider
Other
9 stars 7 forks source link

Question: how to unset bundles/rocksolidslider/js/rocksolid-slider.min.js in contao template j_file #88

Closed pindo-bindo closed 1 year ago

pindo-bindo commented 1 year ago

Hi there,

how can I prevent "bundles/rocksolidslider/js/rocksolid-slider.min.js" from being loaded in a contao templates j_file?

unset(

);

should be the right fuction but neither

$GLOBALS['TL_JAVASCRIPT']['rocksolid_slider'], nor $GLOBALS['TL_JAVASCRIPT']['tl_rocksolid_slider'], nor $GLOBALS['TL_JAVASCRIPT']['contao-rocksolid-slider'],

work to prevent the javascript file from being loaded.

Can you help?

Many thanks in advance!

ausi commented 1 year ago
foreach (array_keys($GLOBALS['TL_JAVASCRIPT'], 'bundles/rocksolidslider/js/rocksolid-slider.min.js|static') as $key) {
    unset($GLOBALS['TL_JAVASCRIPT'][$key]);
}
pindo-bindo commented 1 year ago

Thank you so much Martin Auswöger!