This commit is contained in:
2026-01-22 00:12:51 +01:00
parent 6c06b850eb
commit 62bf263b8e
2 changed files with 38 additions and 4 deletions

View File

@@ -172,7 +172,14 @@
    B.fetchSections = () => B.fetchResource('sections');
    B.fetchBlocks = () => B.fetchResource('blocks');
    B.getApiItem = (kind, id) => fetchData(kind, 'get', { id: id }); 
    B.getApiItem = (kind, id) => {
        const normalized = String(kind || '').toLowerCase();
        const legacyKinds = ['templates', 'sections', 'blocks', 'snippets', 'content', 'sections_config', 'content_versions'];
        if (B.USE_DYNAMIC_SECTIONS && !legacyKinds.includes(normalized)) {
            return fetchData('content', 'get', { id: id, section_slug: normalized, active_only: 1 });
       }
        return fetchData(normalized || kind, 'get', { id: id });
    };
    B.clearApiCache = () => {
        B.ApiItemCache = {}; // Cache leeren