Skip to content

Commit

Permalink
merge of #1543. Thanks @czullu
Browse files Browse the repository at this point in the history
  • Loading branch information
bjansen committed Sep 27, 2024
1 parent a370728 commit 331b154
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
4 changes: 2 additions & 2 deletions src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/Page.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -1669,7 +1669,7 @@ public async Task<string> 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();
Expand Down

0 comments on commit 331b154

Please sign in to comment.