Replies: 2 comments 5 replies
-
Did you end up figuring this one out @Niax01? In the same boat. |
Beta Was this translation helpful? Give feedback.
4 replies
-
You can run Get-PnpPage cmdlet to view the different sections on a page, like so: $page = Get-PnPPage "Your-Page-Name.aspx"
$page.Sections[0] This will output something like this: Type : OneColumnVerticalSection
Order : 1
Columns : {PnP.Core.Model.SharePoint.CanvasColumn, PnP.Core.Model.SharePoint.CanvasColumn}
Page : PnP.Core.Model.SharePoint.Page
Controls : {ca496ec1-abed-4390-8833-7ea67bfdd787, 0f087d7f-520e-42b7-89c0-496aaf979d58,
7f718435-ee4d-431c-bdbf-9c4ff326f46e, c70391ea-0b10-4ee9-b2b4-006d3fcad0cd...}
DefaultColumn : PnP.Core.Model.SharePoint.CanvasColumn
VerticalSectionColumn : PnP.Core.Model.SharePoint.CanvasColumn
ZoneEmphasis : 0
Collapsible : False
IsExpanded : False
DisplayName :
IconAlignment :
ShowDividerLine : False
SectionType : 0 Notice the type and columns. In my case I had a one column layout in the top and the vertical section on the right. If you have a different layout with more columns that response will differ but it will be the same approach. This means we can do the following to add a web part in that section:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am creating pages programmatically from a Page Template and at the same time configuring and adding web parts to the same.
I am using this cmdlet.
Add-PnPWebPart -Page testpage.aspx -DefaultWebPartType "QuickLinks" -WebPartProperties $jsonProps -Section 1 -Column 1
I have one 2 column section and a Vertical section on the page and need to add my Quick Links web part to the Vertical section, but can't figure out how to.
I am not using Section 1 and Column 1 as in the example above, it's just for demonstration purpose, but shouldn't there be a value even for the vertical section?
Thank you!
/Nicklas
Beta Was this translation helpful? Give feedback.
All reactions