From 0379e5302709ae4f84c5cde2ac996388cbab7439 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 18 Nov 2024 07:17:00 +0000 Subject: [PATCH] Squashed 'template/pages/' changes from 93886199..5e56b617 5e56b617 Update with @ecomplus/storefront-template v2.0.0-beta.276 852e03e8 Update with @ecomplus/storefront-template v2.0.0-beta.250 git-subtree-dir: template/pages git-subtree-split: 5e56b6174b575f39ddf10a45f49ba1b7f050135a --- #cms/pages.ejs | 34 +++++++++++++++++++++++++++++++++- #cms/posts.ejs | 34 +++++++++++++++++++++++++++++++++- @/layout/header.ejs | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+), 2 deletions(-) diff --git a/#cms/pages.ejs b/#cms/pages.ejs index eb57ce180d..cc9036475d 100644 --- a/#cms/pages.ejs +++ b/#cms/pages.ejs @@ -1,5 +1,6 @@ <% const { slug, content } = await _.resolveRoute() +const isNotFound = !Object.keys(content).length _.breadcrumbs = [{ name: content.title, link: `/pages/${slug}` @@ -15,4 +16,35 @@ if (!content.sections || !content.sections.length) { } %> -<%- await include('@/view') %> +<% if (!isNotFound) { %> + <%- await include('@/view') %> +<% } else { %> + + + + <%- await include('@/head') %> + + + <%- await include('@/layout/menu') %> +
+ <%- await include('@/layout/header') %> +
+ +
+ <%- await include('@/layout/footer') %> +
+ <%- await include('@/json') %> + <%- await include('@/scripts') %> + + +<% } %> diff --git a/#cms/posts.ejs b/#cms/posts.ejs index 200f2020ec..6f3be6d536 100644 --- a/#cms/posts.ejs +++ b/#cms/posts.ejs @@ -1,6 +1,7 @@ <% const blogPage = _.cms('blog') const { slug, content } = await _.resolveRoute() +const isNotFound = !Object.keys(content).length _.breadcrumbs = [{ name: blogPage.title, link: `/blog` @@ -19,4 +20,35 @@ if (!content.sections || !content.sections.length) { } %> -<%- await include('@/view') %> +<% if (!isNotFound) { %> + <%- await include('@/view') %> +<% } else { %> + + + + <%- await include('@/head') %> + + + <%- await include('@/layout/menu') %> +
+ <%- await include('@/layout/header') %> +
+ +
+ <%- await include('@/layout/footer') %> +
+ <%- await include('@/json') %> + <%- await include('@/scripts') %> + + +<% } %> diff --git a/@/layout/header.ejs b/@/layout/header.ejs index 0b9bea1c2d..5239f39ec9 100644 --- a/@/layout/header.ejs +++ b/@/layout/header.ejs @@ -49,6 +49,7 @@ const hasMegamenu = header.desktop_megamenu const isAlphabeticalOrderSubmenu = header.alphabetical_order_submenu const fullWidthSubmenu = header.full_width_submenu const isCentralizedLogo = header.centralized_logo +const hasAllDepartments = header.menu_all_departments %>
@@ -268,6 +269,50 @@ const isCentralizedLogo = header.centralized_logo <% if (categories && categories.length) { %>