Skip to content

Commit b1be2e5

Browse files
authored
Merge pull request #3129 from gautamdsheth/feature/2350
Feature #2350 - Add support for vertical column emphasis
2 parents 31dc976 + 350f689 commit b1be2e5

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
2222
- Added `-OpenInNewTab` parameter to `Add-PnPNavigationNode` cmdlet to allow links to be opened in a new tab. [#3094](https://github.com/pnp/powershell/pull/3094)
2323
- Added `-ArchiveRedirectUrl` to `Set-PnPTenant` allowing the configuration of a custom page to be shown when navigating to an archived SharePoint Online site [#3100](https://github.com/pnp/powershell/pull/3100)
2424
- Added `-BlockSendLabelMismatchEmail` to `Set-PnPTenant` allowing the warning e-mail being sent when uploading a file with a higher sensitivity label than the site it is being uploaded to to be disabled. [#3113](https://github.com/pnp/powershell/pull/3113)
25-
- Added `Move-PnPTerm` and `Move-PnPTermSet` cmdlets to allow moving the terms and termsets. [#2989](https://github.com/pnp/powershell/pull/2989)
25+
- Added `Move-PnPTerm` and `Move-PnPTermSet` cmdlets to allow moving the terms and termsets. [#2989](https://github.com/pnp/powershell/pull/2989)
26+
- Added `-VerticalZoneEmphasis` parameter to `Add-PnPPageSection` cmdlet to allow setting the emphasis value for vertical columns.
2627

2728
### Fixed
2829

documentation/Add-PnPPageSection.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Adds a new section to a page
1616

1717
```powershell
1818
Add-PnPPageSection [-Page] <PagePipeBind> -SectionTemplate <CanvasSectionTemplate>
19-
[-Order <Int32>] [-ZoneEmphasis <Int32>] [-Connection <PnPConnection>]
19+
[-Order <Int32>] [-ZoneEmphasis <Int32>] [-VerticalZoneEmphasis <Int32>] [-Connection <PnPConnection>]
2020
2121
```
2222

@@ -56,6 +56,15 @@ PS> Add-PnPPageSection -Page $page -SectionTemplate OneColumn -ZoneEmphasis 2
5656

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

59+
### EXAMPLE 4
60+
```powershell
61+
$page = Add-PnPPage -Name "MyPage"
62+
PS> Add-PnPPageSection -Page $page -SectionTemplate OneColumnVerticalSection -Order 1 -ZoneEmphasis 2 -VerticalZoneEmphasis 3
63+
```
64+
65+
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.
66+
67+
5968
## PARAMETERS
6069

6170
### -Connection
@@ -131,8 +140,21 @@ Accept pipeline input: False
131140
Accept wildcard characters: False
132141
```
133142
134-
## RELATED LINKS
143+
### -VerticalZoneEmphasis
144+
Sets the background of the vertical section (default = 0).
145+
Works only for vertical column layouts, will be ignored for other layouts.
135146
136-
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
147+
```yaml
148+
Type: Int32
149+
Parameter Sets: (All)
150+
151+
Required: False
152+
Position: Named
153+
Default value: None
154+
Accept pipeline input: False
155+
Accept wildcard characters: False
156+
```
137157
158+
## RELATED LINKS
138159
160+
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)

src/Commands/Pages/AddPageSection.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ public class AddPageSection : PnPWebCmdlet
2020
[Parameter(Mandatory = false)]
2121
public int ZoneEmphasis = 0;
2222

23+
[Parameter(Mandatory = false)]
24+
public int VerticalZoneEmphasis = 0;
25+
2326
protected override void ExecuteCmdlet()
2427
{
2528
var page = Page?.GetPage(Connection);
2629

2730
if (page != null)
2831
{
29-
page.AddSection(SectionTemplate, Order, ZoneEmphasis);
32+
page.AddSection(SectionTemplate, Order, ZoneEmphasis, VerticalZoneEmphasis);
3033
page.Save();
3134
}
3235
else

0 commit comments

Comments
 (0)