Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Feature: add HeaderLayoutType parameter to AddClientSidePage command. #2514

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 4 additions & 0 deletions Commands/ClientSidePages/AddClientSidePage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public class AddClientSidePage : PnPWebCmdlet
[Parameter(Mandatory = false, HelpMessage = "Publishes the page once it is saved. Applicable to libraries set to create major and minor versions.")]
public SwitchParameter Publish;

[Parameter(Mandatory = false, HelpMessage = "Type of layout used inside the header")]
public ClientSidePageHeaderLayoutType HeaderLayoutType = ClientSidePageHeaderLayoutType.FullWidthImage;

[Obsolete("This parameter will be ignored")]
[Parameter(Mandatory = false, HelpMessage = "Sets the message for publishing the page.")]
public string PublishMessage = string.Empty;
Expand Down Expand Up @@ -76,6 +79,7 @@ protected override void ExecuteCmdlet()
// Create a page that persists immediately
clientSidePage = SelectedWeb.AddClientSidePage(name);
clientSidePage.LayoutType = LayoutType;
clientSidePage.PageHeader.LayoutType = HeaderLayoutType;
if (PromoteAs == ClientSidePagePromoteType.Template)
{
clientSidePage.SaveAsTemplate(name);
Expand Down