From 68a1aaae08ce0b9d35102ac7dc3aa5716ec25c06 Mon Sep 17 00:00:00 2001 From: Tony Klapatch Date: Thu, 7 Nov 2024 10:01:38 -0500 Subject: [PATCH] Fix sidebar block after aem.js update --- best-cigars-guide/scripts/scripts.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/best-cigars-guide/scripts/scripts.js b/best-cigars-guide/scripts/scripts.js index de97cad..88b6a8c 100644 --- a/best-cigars-guide/scripts/scripts.js +++ b/best-cigars-guide/scripts/scripts.js @@ -1,6 +1,21 @@ /* eslint-disable max-len */ // eslint-disable-next-line object-curly-newline -import { buildBlock, loadHeader, loadFooter, decorateButtons, decorateIcons, decorateSections, decorateBlocks, decorateTemplateAndTheme, waitForFirstImage, loadSections, loadSection, loadCSS, decorateBlock } from './aem.js'; +import { + buildBlock, + loadHeader, + loadFooter, + decorateButtons, + decorateIcons, + decorateSections, + decorateBlocks, + decorateTemplateAndTheme, + waitForFirstImage, + loadSections, + loadSection, + loadCSS, + decorateBlock, + loadBlock +} from './aem.js'; const CATEGORY_INDEX_PATH = '/best-cigars-guide/index/category-index.json'; const ARTICLE_INDEX_PATH = '/best-cigars-guide/index/query-index.json'; @@ -181,6 +196,7 @@ function buildSidebarBlock(main) { const block = buildBlock('sidebar', ''); sidebar.append(block); decorateBlock(block); + loadBlock(block); container.classList.add('article-wrapper'); container.append(sidebar);