示例#1
0
        protected override void ExecuteCmdlet()
        {
            switch (ParameterSetName)
            {
            case "WithTitle":
            {
                SelectedWeb.AddPublishingPage(PageName, PageTemplateName, Title, publish: Publish);
                break;
            }

            default:
            {
                SelectedWeb.AddPublishingPage(PageName, PageTemplateName, publish: Publish);
                break;
            }
            }
        }
示例#2
0
        protected override void ExecuteCmdlet()
        {
            Folder pageFolder = null;

            if (!string.IsNullOrEmpty(FolderPath))
            {
                pageFolder = SelectedWeb.EnsureFolderPath(FolderPath);
            }

            switch (ParameterSetName)
            {
            case "WithTitle":
            {
                SelectedWeb.AddPublishingPage(PageName, PageTemplateName, Title, publish: Publish, folder: pageFolder);
                break;
            }

            default:
            {
                SelectedWeb.AddPublishingPage(PageName, PageTemplateName, publish: Publish, folder: pageFolder);
                break;
            }
            }
        }