[BUG] Get-PnPSiteTemplate - exporting SiteHeader and SiteFooter
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 904
- Forks
- 407
- Avg merge
- 9h 16m
- Merged PRs (30d)
- 10
Description
When I export a PnP Provisioning template with Get-PnPSiteTemplate and have the SiteHeader handler specified in the config JSON, I get this short section:
<pnp:Header Layout="Extended" MenuStyle="MegaMenu" ShowSiteTitle="false" />
The section doesn't include other important "modern" settings, like background image.
Ditto SiteFooter
<pnp:Footer Enabled="true" RemoveExistingNodes="false" BackgroundEmphasis="Strong" />
I use a fix like this after applying the template:
# # Set site header background image and other settings
Set-PnPWebHeader -Connection $newSiteConnection `
-HeaderLayout Extended `
-HeaderBackgroundImageUrl "/sites/$siteUrl/SiteAssets/__extendedHeaderBackgroundImage__DEFAULT_CHROME_BG_IMAGE_NAME.png" `
-SiteThumbnailUrl "/sites/$siteUrl/SiteAssets/__sitelogo__credimus-icon@2x.png" `
-SiteLogoUrl "/sites/$siteUrl/SiteAssets/__rectSitelogo__credimus-full@2x.png"
Set-PnPWeb -Connection $newSiteConnection -HideTitleInHeader
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Get-PnPSiteTemplate export path and the configuration handling for SiteHeader and SiteFooter. Reproduce the export using the issue's JSON handler settings, then verify that the generated Header and Footer elements retain the modern settings shown by the cmdlets; done means those settings are present in the exported template.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100