Skip to content

Commit

Permalink
Update LayoutType parameter (#3777)
Browse files Browse the repository at this point in the history
Co-authored-by: Gautam Sheth <gautamdsheth@outlook.com>
  • Loading branch information
a1mery and gautamdsheth authored Feb 23, 2024
1 parent 8eab27b commit cf205f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion documentation/Set-PnPPage.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Accept wildcard characters: False
```
### -LayoutType
Sets the layout type of the page. (Default = Article)
Sets the layout type of the page.
```yaml
Type: PageLayoutType
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Pages/SetPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected override void ExecuteCmdlet()
throw new Exception("Insufficient arguments to update a client side page");

// Don't allow changing a topic page into a regular page as that could lead to data loss
if (clientSidePage.LayoutType != PageLayoutType.Topic)
if (ParameterSpecified(nameof(LayoutType)) && clientSidePage.LayoutType != PageLayoutType.Topic)
{
clientSidePage.LayoutType = LayoutType;
}
Expand Down

0 comments on commit cf205f6

Please sign in to comment.