How to make page title center using Set-PnPPage on SharePoint Online? #960
-
Hi, I need to update the page title text along with the alignment (center). I had tried to do it with |
Beta Was this translation helpful? Give feedback.
Answered by
LeonArmston
Aug 2, 2021
Replies: 1 comment 1 reply
-
Hi The below will allow you to check and then change the page header on a modern page to be centre aligned. #Get Page Object
$page = Get-PnPPage -Identity "Centre.aspx"
$page.PageHeader #Check Text Alignment Property for existing value
#Update Page Header Text Alignment to Center
$page.PageHeader.TextAlignment = "Center"
$page.Save()
Invoke-PnPQuery
Thanks |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
in8AnkKu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
The below will allow you to check and then change the page header on a modern page to be centre aligned.
Thanks