Search Results for

    Show / Hide Table of Contents

    Add-PnPPageSection

    SYNOPSIS

    Adds a new section to a page.

    SYNTAX

    Add-PnPPageSection [-Page] <PagePipeBind> -SectionTemplate <CanvasSectionTemplate>
     [-Order <Int32>] [-ZoneEmphasis <Int32>] [-VerticalZoneEmphasis <Int32>] [-Connection <PnPConnection>]
     
    

    DESCRIPTION

    Allows to add a new section to a page.

    EXAMPLES

    EXAMPLE 1

    Add-PnPPageSection -Page "MyPage" -SectionTemplate OneColumn
    

    Adds a new one-column section to the page 'MyPage'

    EXAMPLE 2

    Add-PnPPageSection -Page "MyPage" -SectionTemplate ThreeColumn -Order 10
    

    Adds a new Three columns section to the page 'MyPage' with an order index of 10.

    EXAMPLE 3

    $page = Add-PnPPage -Name "MyPage"
    Add-PnPPageSection -Page $page -SectionTemplate OneColumn
    

    Adds a new one column section to the page 'MyPage'.

    EXAMPLE 4

    $page = Add-PnPPage -Name "MyPage"
    Add-PnPPageSection -Page $page -SectionTemplate OneColumn -ZoneEmphasis 2
    

    Adds a new one column section to the page 'MyPage' and sets the background to 2 (0 is no background, 3 is highest emphasis).

    EXAMPLE 5

    $page = Add-PnPPage -Name "MyPage"
    Add-PnPPageSection -Page $page -SectionTemplate OneColumnVerticalSection -Order 1 -ZoneEmphasis 2 -VerticalZoneEmphasis 3
    

    Adds a new one column with one vertical section to the page 'MyPage' and sets the zone emphasis to 2 for one column and vertical zone emphasis to 3 for the vertical column.

    PARAMETERS

    -Connection

    Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

    Type: PnPConnection
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Order

    Sets the order of the section. (Default = 1)

    Type: Int32
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Page

    The name of the page or the page object.

    Type: PagePipeBind
    Parameter Sets: (All)
    
    Required: True
    Position: 0
    Default value: None
    Accept pipeline input: True (ByValue)
    Accept wildcard characters: False
    

    -SectionTemplate

    Specifies the columns template to use for the section.

    Type: CanvasSectionTemplate
    Parameter Sets: (All)
    Accepted values: OneColumn, OneColumnFullWidth, TwoColumn, ThreeColumn, TwoColumnLeft, TwoColumnRight, OneColumnVerticalSection, TwoColumnVerticalSection, ThreeColumnVerticalSection, TwoColumnLeftVerticalSection, TwoColumnRightVerticalSection
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -ZoneEmphasis

    Sets the background of the section (default = 0).

    Type: Int32
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -VerticalZoneEmphasis

    Sets the background of the vertical section (default = 0). Works only for vertical column layouts, will be ignored for other layouts.

    Type: Int32
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    RELATED LINKS

    Microsoft 365 Patterns and Practices

    Back to top Generated by DocFX spacer