qumra-engine 2.0.89 → 2.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,7 +51,20 @@ exports.default = new (class WidgetExtension {
|
|
|
51
51
|
blocks: widget.blocks ?? [],
|
|
52
52
|
},
|
|
53
53
|
});
|
|
54
|
-
|
|
54
|
+
let isIframe = false;
|
|
55
|
+
if (env.getGlobal("isIframe")) {
|
|
56
|
+
isIframe = env.getGlobal("isIframe");
|
|
57
|
+
}
|
|
58
|
+
if (isIframe) {
|
|
59
|
+
renderedWidgets.push(`
|
|
60
|
+
<section widget-id="${widget.id}" id="qumra-widget-id-${widget.id}">
|
|
61
|
+
${html}
|
|
62
|
+
</section>
|
|
63
|
+
`);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
renderedWidgets.push(html);
|
|
67
|
+
}
|
|
55
68
|
}
|
|
56
69
|
catch (err) {
|
|
57
70
|
renderedWidgets.push(`
|
|
@@ -18,7 +18,7 @@ exports.default = new (class WidgetExtension {
|
|
|
18
18
|
run({ ctx, env }, templateKey) {
|
|
19
19
|
const widgetPreview = env.getGlobal("widget");
|
|
20
20
|
if (widgetPreview) {
|
|
21
|
-
return
|
|
21
|
+
return "";
|
|
22
22
|
}
|
|
23
23
|
if (templateKey === "main") {
|
|
24
24
|
return new nunjucks_1.default.runtime.SafeString(`
|
|
@@ -51,7 +51,20 @@ exports.default = new (class WidgetExtension {
|
|
|
51
51
|
blocks: widget.blocks ?? [],
|
|
52
52
|
},
|
|
53
53
|
});
|
|
54
|
-
|
|
54
|
+
let isIframe = false;
|
|
55
|
+
if (env.getGlobal("isIframe")) {
|
|
56
|
+
isIframe = env.getGlobal("isIframe");
|
|
57
|
+
}
|
|
58
|
+
if (isIframe) {
|
|
59
|
+
renderedWidgets.push(`
|
|
60
|
+
<section widget-id="${widget.id}" id="qumra-widget-id-${widget.id}">
|
|
61
|
+
${html}
|
|
62
|
+
</section>
|
|
63
|
+
`);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
renderedWidgets.push(html);
|
|
67
|
+
}
|
|
55
68
|
}
|
|
56
69
|
catch (err) {
|
|
57
70
|
renderedWidgets.push(`
|