From fac0eaf313ce6bd0522bd80dde2996f98c1ce536 Mon Sep 17 00:00:00 2001 From: Hugues Tennier Date: Wed, 2 Oct 2024 14:16:22 -0400 Subject: [PATCH] docs: check for `parent_enterprise` in Breadcrumbs (#6458) --- docs/themes/v2/layout/page.ejs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/themes/v2/layout/page.ejs b/docs/themes/v2/layout/page.ejs index 91da509bd195..747d3d214b30 100644 --- a/docs/themes/v2/layout/page.ejs +++ b/docs/themes/v2/layout/page.ejs @@ -1,3 +1,4 @@ +<% const isEnterpriseTheme = theme.tier === "enterprise" %> <% const pageContainsHeadings = page.content.includes(" <% const tocPageTypes = page.type === "guide" || page.type === "blog" || page.type === "templates" || page.type === "tags" %> @@ -9,7 +10,7 @@
<% if(page.type && page.parent !== undefined) { %> - <%- breadcrumb({pageType: page.type, parentPage: page.parent, currentPage: page.title, parentPageExtension: page.parent_page_extension }) %> + <%- breadcrumb({pageType: page.type, parentPage: isEnterpriseTheme && page.parent_enterprise ? page.parent_enterprise : page.parent, currentPage: page.title, parentPageExtension: page.parent_page_extension }) %> <% } %> <% if (!page.hide_frontmatter_title && page.title.trim()) { %> <%- partial("component/heading", {text: page.title, size: "XLarge", tag: "h1", customClass: "home-page-title"}) %>