Add admin scroll controls and site interaction fixes

This commit is contained in:
dcconstructions
2026-06-26 18:43:03 +03:00
parent 25e5afedf2
commit fb1531f7c5
17 changed files with 641 additions and 323 deletions
+6 -1
View File
@@ -114,7 +114,12 @@ function renderEachBlocks(html, block) {
throw new Error(`Each token "${path}" in block "${block.id}" must point to an array`);
}
return items.map((item) => renderTemplate(innerHtml, item ?? {})).join("");
return items
.map((item) => {
const itemScope = item && typeof item === "object" && !Array.isArray(item) ? item : { value: item };
return renderTemplate(innerHtml, { ...block, ...itemScope });
})
.join("");
});
}