init
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \Esun\PromotionPopup\Block\Popup $block
|
||||
* @var \Magento\Framework\Escaper $escaper
|
||||
*/
|
||||
if (!$block->isAvailable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$content = $block->getCmsContent();
|
||||
if (trim($content) === '') {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="esun-promotion-popup"
|
||||
data-role="esun-promotion-popup"
|
||||
aria-hidden="true">
|
||||
<?= /* @noEscape */ $content ?>
|
||||
</div>
|
||||
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"[data-role=esun-promotion-popup]": {
|
||||
"Esun_PromotionPopup/js/popup": <?= /* @noEscape */ $block->getJsonConfig() ?>
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user