Closed rustykowski closed 6 years ago
That's cool, thank you!
But why do you put <style>
into the BODY for IE11 and Edge? This works in both browsers with useCss = true
.
@rustykowski: You can change your template
<?php if ($this->useCss || true): ?>
Sorry, I see you put the templates $strBuffer
into the HEAD or into the BODY and if only I change my template like above, then the <style>
gets into the BODY.
Which browsers need those JS solutions? IE11 and Edge seems not.
According to the table https://github.com/terminal42/contao-pageimage/blob/8a671feae2a11f22043f9738e6d0587d53282541/ModuleBackgroundImage.php#L54-L60 it is
as you can tell, the extension is very much outdated because it has not been updated/rewritten for a long time 😉
Ok, then something seems to be wrong. This line does not set IE11(9, 10?) and Edge useCss
to true.
$this->Template->useCss = (isset($support[$agent->browser]) && $agent->version >= $support[$agent->browser]);
useCss seems to be a flag in the template mod_background_image.html5. If true, a simple CSS-style is used, otherwise a javascript-solution for positioning and sizing the image.
How is this flag set? I cannot find it in the module configuration.