diff --git a/src/Models/Elements/ElementIframe.php b/src/Models/Elements/ElementIframe.php index 778ad57..8b7db35 100644 --- a/src/Models/Elements/ElementIframe.php +++ b/src/Models/Elements/ElementIframe.php @@ -465,4 +465,11 @@ public function getCMSFields() { return $fields; } + /** + * Return whether lazy load polyfill is enabled, useful in templates + */ + public function HasPolyfill(): bool { + return (bool)self::config()->get('load_polyfill'); + } + } diff --git a/templates/NSWDPC/Elemental/Models/Iframe/ElementIframe.ss b/templates/NSWDPC/Elemental/Models/Iframe/ElementIframe.ss index a6b4cc3..9150bcf 100644 --- a/templates/NSWDPC/Elemental/Models/Iframe/ElementIframe.ss +++ b/templates/NSWDPC/Elemental/Models/Iframe/ElementIframe.ss @@ -1,7 +1,7 @@