qumra-engine 2.0.97 → 2.0.99
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.
|
@@ -283,7 +283,7 @@ exports.default = new (class SeoExtension {
|
|
|
283
283
|
type: "widgetAction",
|
|
284
284
|
action: "edit",
|
|
285
285
|
widgetId: element.getAttribute("widget-id"),
|
|
286
|
-
templateKey: element.getAttribute("template-key")
|
|
286
|
+
templateKey: element.getAttribute("template-key"),
|
|
287
287
|
templateId: element.getAttribute("template-id")
|
|
288
288
|
},
|
|
289
289
|
"*"
|
|
@@ -20,14 +20,14 @@ exports.default = new (class WidgetExtension {
|
|
|
20
20
|
if (widgetPreview) {
|
|
21
21
|
return "";
|
|
22
22
|
}
|
|
23
|
-
if (templateKey === "main") {
|
|
24
|
-
|
|
25
|
-
<div style="padding: 12px; background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; border-radius: 4px; margin: 8px 0;">
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
}
|
|
23
|
+
// if (templateKey === "main") {
|
|
24
|
+
// return new nunjucks.runtime.SafeString(`
|
|
25
|
+
// <div style="padding: 12px; background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; border-radius: 4px; margin: 8px 0;">
|
|
26
|
+
// ⚠️ <strong>لا يمكن تضمين قالب "{% template "main" %}" بشكل مباشر:</strong>
|
|
27
|
+
// <p>يمكنك استخدام "{% content %}" لعرض المحتوى الرئيسي للصفحة</p>
|
|
28
|
+
// </div>
|
|
29
|
+
// `);
|
|
30
|
+
// }
|
|
31
31
|
const templates = env.getGlobal("templates");
|
|
32
32
|
const template = templates.find((t) => t.key === templateKey);
|
|
33
33
|
const widgets = template?.widgets || [];
|