Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to update horizontal quick launch for set-pnpweb #3722

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion documentation/Set-PnPWeb.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Sets properties on a web
Set-PnPWeb [-SiteLogoUrl <String>] [-AlternateCssUrl <String>] [-Title <String>] [-Description <String>]
[-MasterUrl <String>] [-CustomMasterUrl <String>] [-QuickLaunchEnabled] [-MembersCanShare] [-NoCrawl]
[-HeaderLayout <HeaderLayoutType>] [-HeaderEmphasis <SPVariantThemeType>] [-NavAudienceTargetingEnabled]
[-MegaMenuEnabled] [-DisablePowerAutomate] [-CommentsOnSitePagesDisabled] [-HideTitleInHeader]
[-MegaMenuEnabled] [-DisablePowerAutomate] [-CommentsOnSitePagesDisabled] [-HideTitleInHeader] [-HorizontalQuickLaunch]
[-Connection <PnPConnection>]
```

Expand Down Expand Up @@ -299,6 +299,24 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -HorizontalQuickLaunch

Change navigation orientation to horizontal

Set -HorizontalQuickLaunch :$false to change navigation to vertical

```yaml
Type: SwitchParameter
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](https://aka.ms/m365pnp)
Expand Down
8 changes: 8 additions & 0 deletions src/Commands/Web/SetWeb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class SetWeb : PnPWebCmdlet
[Parameter(Mandatory = false)]
public SwitchParameter HideTitleInHeader;

[Parameter(Mandatory = false)]
public SwitchParameter HorizontalQuickLaunch;
protected override void ExecuteCmdlet()
{
var dirty = false;
Expand Down Expand Up @@ -160,6 +162,12 @@ protected override void ExecuteCmdlet()
dirty = true;
break;
}
case nameof(HorizontalQuickLaunch):
{
CurrentWeb.HorizontalQuickLaunch = HorizontalQuickLaunch.ToBool();
dirty = true;
break;
}
}
}

Expand Down
Loading