From 80df2298004e467414ff76f0efd9ad76514754d1 Mon Sep 17 00:00:00 2001 From: Phani-iTalent <48746413+Phani-iTalent@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:30:57 +0530 Subject: [PATCH 1/2] PCDTUS-49: Change Product meta to docset-title The changes are validated at https://main--prisma-cloud-docs-website--hlxsites.hlx.live/prisma/prisma-cloud/en/classic/cspm-admin-guide/prisma-cloud-policies/prisma-cloud-policies --- prisma/prisma-cloud/blocks/search-bar/search-bar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prisma/prisma-cloud/blocks/search-bar/search-bar.js b/prisma/prisma-cloud/blocks/search-bar/search-bar.js index f9c8bfe..78a1555 100644 --- a/prisma/prisma-cloud/blocks/search-bar/search-bar.js +++ b/prisma/prisma-cloud/blocks/search-bar/search-bar.js @@ -75,7 +75,7 @@ export class SearchBar extends HTMLElement { init() { const booknameMeta = getMetadata('book-name'); - const productMeta = getMetadata('product'); + const productMeta = getMetadata('docset-title'); const docsetMeta = getMetadata('docset-id'); const appendDropdown = this.querySelector('.dropdown-content'); From 51bbd32c36d8d8b5e0a5acf9af5bfe83622e5b5a Mon Sep 17 00:00:00 2001 From: Ian <> Date: Fri, 29 Sep 2023 11:14:03 -0500 Subject: [PATCH 2/2] Capitalize 'b' in 'Books' in search drop-down --- prisma/prisma-cloud/blocks/search-bar/search-bar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prisma/prisma-cloud/blocks/search-bar/search-bar.js b/prisma/prisma-cloud/blocks/search-bar/search-bar.js index 78a1555..1a9a316 100644 --- a/prisma/prisma-cloud/blocks/search-bar/search-bar.js +++ b/prisma/prisma-cloud/blocks/search-bar/search-bar.js @@ -105,11 +105,11 @@ export class SearchBar extends HTMLElement { if (!booknameMeta) { this.querySelector('.coveo-dropdown-item.selected').classList.remove('selected'); docSetOption.classList.add('selected'); - this.querySelector('.dropbtn').textContent = `All ${productMeta} books`; + this.querySelector('.dropbtn').textContent = `All ${productMeta} Books`; } - docSetOption.setAttribute('data-label', `All ${productMeta} books`); + docSetOption.setAttribute('data-label', `All ${productMeta} Books`); docSetOption.setAttribute('data-value', `@td_docsetid==("${docsetMeta}")`); - docSetOption.append(`All ${productMeta} books`); + docSetOption.append(`All ${productMeta} Books`); appendDropdown.prepend(docSetOption); } if (booknameMeta) {