Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,29 @@ public override TokenParser ProvisionObjects(Web web, ProvisioningTemplate templ
"DesignPreview"
});

//modern header, footer, font settings have to be set with SetChromeOptions, Set[xxxx]FontPackage (pnpContext.Web.GetBrandingManager()) in order to work as expected
var brandingSettings = new List<string>(new[]
{
"headeroverlaycolor",
"headeroverlayopacity",
"headeroverlaygradientdirection",
"headercolorindexinlightmode",
"headercolorindexindarkmode",
"footeralignment",
"footeroverlaycolor",
"footeroverlayopacity",
"footeroverlaygradientdirection",
"footercolorindexinlightmode",
"footercolorindexindarkmode",
"fontoptionforsitetitle",
"fontoptionforsitenav",
"fontoptionforsitefootertitle",
"fontoptionforsitefooternav",
"footerbackgroundimageurl",
"footerbackgroundimagefocalpoint",
"backgroundimageurl"
});

// Check if this is not a noscript site as we're not allowed to write to the web property bag is that one
bool isNoScriptSite = web.IsNoScriptSite();
if (isNoScriptSite)
Expand All @@ -44,7 +67,7 @@ public override TokenParser ProvisionObjects(Web web, ProvisioningTemplate templ

web = newContext.Web;

foreach (var propbagEntry in template.PropertyBagEntries)
foreach (var propbagEntry in template.PropertyBagEntries.Where(p=> !brandingSettings.Contains(p.Key.ToLower())))
{
bool propExists = web.PropertyBagContainsKey(propbagEntry.Key);

Expand Down
Loading
Loading