Forum Discussion
Header area for Modern Pages
From this page:
Check out the image. No big giant white space on top! This is sneaky, Microsoft.
- Stephan SwinfordMar 24, 2017Iron ContributorI'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.- 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"}
- 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.
- MrCarrickNov 23, 2016Copper Contributor
True, the Modern homepage and Modern Site Pages do have a slighty different design, which can be a little jarring when navigating around. With the homepage in mind I guess we have the extra space allowing for the focus to fall on Team News.
At Ignite 2016 it was mentiond that customisation options for the banner on non-homepage Modern Site Pages would be coming in the future. Unfortunately I don't remember the session ID it was mentioned in...
Hopefully this is something that will come once everything has received at least the first pass of the 'Modern SharePoint' look and feel.