pnp / pnp/pnpframework

Unable to create a page without header / banner webpart

Open
#1,122 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

I am trying to create a template with pages without a header. So I create a page, remove the banner webpart with the section. Save the page and publish it. All is fine. Then I create the template with PnP.PowerShell (Get-PnpSiteTemplate -Out teplate.xml -IncludeAllPages).

When I then invoke the template again, my pages will have the default banner webpart again on the page.

The XML created for a page without header will have this block:

<pnp:Header Type="Default" LayoutType="FullWidthImage" ShowTopicHeader="false" ShowPublishDate="false" ShowBackgroundGradient="false" TopicHeader="" AlternativeText="" Authors="" AuthorByLineId="-1" />

The result will look like this:

Image

Removing the header line in xml will result in something like this (same goes for a header with type = None):

Image

It should look like this (no banner at all):

Image

Some additionally information:
PnP.PowerShell Version: 2.99.175-nightly

Having the same problems using the current release of PnP.Framework Nuget package (1.17.0 with PnP.Core 1.14.0) in C#

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with PnP.PowerShell using Get-PnPSiteTemplate -IncludeAllPages, then apply the generated template and compare the page Header XML with a page that has no banner. Trace the PnP.Framework provisioning path that reads and applies the pnp:Header element; done means pages without a header remain without the default banner.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, xml
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.