From 5587c928eb1896f0e53e5363098d8c6f2bcc2361 Mon Sep 17 00:00:00 2001 From: Christian Zuellig Date: Wed, 25 Sep 2024 22:19:33 +0200 Subject: [PATCH] Fix check for HeaderTypes as new PageTitle WebPart in OneColumnFullWIth is not always in first section --- .../Provisioning/ObjectHandlers/ObjectClientSidePages.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectClientSidePages.cs b/src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectClientSidePages.cs index bc77a784..bbc6d943 100644 --- a/src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectClientSidePages.cs +++ b/src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectClientSidePages.cs @@ -384,9 +384,8 @@ private void CreatePage(Web web, ProvisioningTemplate template, TokenParser pars } case ClientSidePageHeaderType.Default: { - //Message ID: MC791596 / Roadmap ID: 386904 - if (clientSidePage.Sections.Any() && clientSidePage.Sections.First().Type == CanvasSectionType.OneColumnFullWidth && - clientSidePage.Sections.First().Controls.Any(c => c.Type == WebPartType.PageTitle)) + //Message ID: MC791596 / Roadmap ID: 386904 =>based on #1058 the PageTitle WebPart is not always in first section + if (clientSidePage.Sections.Any(s => s.Type == CanvasSectionType.OneColumnFullWidth && s.Controls.Any(c => c.Type == WebPartType.PageTitle))) { page.SetPageTitleWebPartPageHeader(); }