Can I completely remove the Modern page Banner/Title inside my communication site, similar to the modern pages inside the look-book?

john john 1,026 Reputation points
2021-11-06T00:24:10.207+00:00

Inside the SharePoint Lookbook sites, most of them do not have the Modern page Banner/Title, as follow:-

147031-save12.png

While when i tried to add a new modern page inside my communication site, i will always get a Page Banner/Tile, as follow:-

146974-save123.png

so how i can completely remove it? I know that i can set the banner as Plain, but this will still show the title text, while i need to remove the whole section..any advice?

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,486 Reputation points Microsoft External Staff
    2021-11-08T02:36:45.34+00:00

    Hi @john john ,
    Unfortunately so far there is no option to hide/display the area manually. So we need to set the layout by PowerShell script.
    Please open SharePoint Online Management Shell and run the below command in sequence.

    # Connect to the site    
    Connect-PnPOnline https://xxx.sharepoint.com/sites/xxx  
    # List all pages, and find the id of the modern page    
    Get-PnPListItem -List SitePages    
    # Change layout from "Article" to "Home" to remove top banner    
    Set-PnPListItem -List SitePages –Identity <Id> -Values @{"PageLayoutType"="Home"}    
    

    147169-image.png
    And the page should be like following after running the script
    147211-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.