diff --git a/src/sdk/CHANGELOG.md b/src/sdk/CHANGELOG.md index 48390eb0b3..698612f301 100644 --- a/src/sdk/CHANGELOG.md +++ b/src/sdk/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added `BaseType` property to `IList` #1532 [jansenbe - Bert Jansen] - Added support for listing the properties to load when using `IFolder.EnsureFolderAsync` #1504 [jansenbe - Bert Jansen] - Auth library: Removed the PnP Managent Shell App (`31359c7f-bd7e-475c-86db-fdb8c937548e`) as default app to authenticate with [jansenbe - Bert Jansen] +- Fix check for HeaderTypes as new PageTitle WebPart in OneColumnFullWIth is not always in first section #1543 [czullu - Christian Zuellig] ## [1.14] diff --git a/src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/Page.cs b/src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/Page.cs index 3d4969dadb..534a8a5a2d 100644 --- a/src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/Page.cs +++ b/src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/Page.cs @@ -1445,7 +1445,7 @@ private void LoadFromHtml(string html, string pageHeaderHtml) ReIndex(); var hasPageTitleWPInOneColumFullWith = false; - if (sections.Any(s=> s.Type == CanvasSectionTemplate.OneColumnFullWidth && s.Controls.Any(c => (c as PageWebPart)?.WebPartId?.Equals("cbe7b0a9-3504-44dd-a3a3-0e5cacd07788") == true))) + if (sections.Any(s => s.Type == CanvasSectionTemplate.OneColumnFullWidth && s.Controls.Any(c => (c as PageWebPart)?.WebPartId?.Equals("cbe7b0a9-3504-44dd-a3a3-0e5cacd07788") == true))) { hasPageTitleWPInOneColumFullWith = true; //Message ID: MC791596 / Roadmap ID: 386904 } @@ -1669,7 +1669,7 @@ public async Task SaveAsync(string pageName = null) var pageHeaderHtml = ""; if (pageHeader != null) { - if(pageHeader.Type == PageHeaderType.Default && sections.Any(s=>s.Type == CanvasSectionTemplate.OneColumnFullWidth && s.Controls.Any(c => (c as PageWebPart)?.WebPartId?.Equals("cbe7b0a9-3504-44dd-a3a3-0e5cacd07788") == true))) + if(pageHeader.Type == PageHeaderType.Default && sections.Any(s => s.Type == CanvasSectionTemplate.OneColumnFullWidth && s.Controls.Any(c => (c as PageWebPart)?.WebPartId?.Equals("cbe7b0a9-3504-44dd-a3a3-0e5cacd07788") == true))) { //Page created from code and Header was not set SetPageTitleWebPartPageHeader();