Forum Discussion
Nov 17, 2016
Header area for Modern Pages
Why is the header so tall and empty? I know that with Delve blogs there is place for a background image and in fact is sort of expected. But I don't see the same facility for SP Modern Pages. Am...
Nov 22, 2016
From this page:
Check out the image. No big giant white space on top! This is sneaky, Microsoft.
Stephan Swinford
Mar 24, 2017Iron Contributor
I'll post my own workaround, too. I discovered this one while trying to 'convert' some sites from classic to modern. I wanted them to have a page with the homepage layout that doesn't have any banner.
First, go to the Site Pages library and download any of the modern pages. Next, open SP Designer, open Site Pages, then create a new ASPX and edit it in Advanced Mode.
Open up the page you downloaded into a text editor, such as Notepad, and copy everything. Back in Designer, replace the default ASPX code with your modern page code you just copied. Look for "<mso:PageLayoutType" and change it from "Article" to "Home". While you're here, you may see BannerImageURL. It doesn't appear to change anything at this time, so don't bother with it.
Save your page and then open it in a browser and you should have a new 'home' page.
First, go to the Site Pages library and download any of the modern pages. Next, open SP Designer, open Site Pages, then create a new ASPX and edit it in Advanced Mode.
Open up the page you downloaded into a text editor, such as Notepad, and copy everything. Back in Designer, replace the default ASPX code with your modern page code you just copied. Look for "<mso:PageLayoutType" and change it from "Article" to "Home". While you're here, you may see BannerImageURL. It doesn't appear to change anything at this time, so don't bother with it.
Save your page and then open it in a browser and you should have a new 'home' page.
- AnonymousJul 31, 2017Stephan,
Thanks this worked great. - AnonymousJun 06, 2017
Perfect workaround!
- Miroslav VacuraJun 06, 2017Copper Contributor
You can also use Powershell
1. Connect to the site:
Connect-PnPOnline https://tenant.sharepoint.com/sites/portal
2. List all pages, and find the id of the modern page:
Get-PnPListItem -List SitePages
3. Change layout from "Article" to "Home" to remove large top banner:
Set-PnPListItem -List SitePages -Identity <id> -Values @{"PageLayoutType"="Home"}
- Mihir YelamanchiliNov 21, 2018Brass ContributorThanks this worked.
- Darren O'LearyJun 02, 2017Brass Contributor
Thank you Stephan! Surely Microsoft could have removed this unused space without having to resort to such techniques, but I'm very grateful.
- Kevin ThomasMar 28, 2017Brass Contributor
I'll give this a try. Thx! Can you upload a screenshot of your page?
- Stephan SwinfordMar 28, 2017Iron Contributor
- Kevin ThomasMar 29, 2017Brass Contributor
Stephan,
This worked like a charm! This was a very simple solution. Thanks for the help.
Now I just need to figure out how to make the global navigation at the top work like it used to :)
Thanks again!
Kevin