-
Notifications
You must be signed in to change notification settings - Fork 18
/
PublishingWeb.xml
5019 lines (4742 loc) · 303 KB
/
PublishingWeb.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="PublishingWeb" FullName="Microsoft.SharePoint.Publishing.PublishingWeb">
<TypeSignature Language="C#" Value="public sealed class PublishingWeb" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit PublishingWeb extends System.Object" />
<TypeSignature Language="DocId" Value="T:Microsoft.SharePoint.Publishing.PublishingWeb" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class PublishingWeb" />
<TypeSignature Language="C++ CLI" Value="public ref class PublishingWeb sealed" />
<TypeSignature Language="F#" Value="type PublishingWeb = class" />
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>Microsoft.SharePoint.Client.ClientCallableType(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful, FactoryType=typeof(Microsoft.SharePoint.Publishing.Internal.PublishingClientObjectFactory), ObjectIdentityPropertyName="CanonicalId", ServerTypeId="55927360-235B-4ace-9DCF-C574D6E517EA")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides publishing behavior for an <see cref="T:Microsoft.SharePoint.SPWeb" /> instance that supports publishing. </summary>
<remarks>
<para>The <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> class provides publishing-specific behavior for an <see cref="T:Microsoft.SharePoint.SPWeb" /> that supports publishing, including access to child <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> and <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> instances, variations support, navigation settings, <see cref="T:Microsoft.SharePoint.Publishing.PageLayout" /> and Web template restrictions, and Welcome page settings. This class wraps an <see cref="T:Microsoft.SharePoint.SPWeb" /> instance that has the publishing feature activated.</para>
<para>Instantiate this class by using the static <see cref="M:Microsoft.SharePoint.Publishing.PublishingWeb.GetPublishingWeb(Microsoft.SharePoint.SPWeb)" /> method or by retrieving it from a <see cref="T:Microsoft.SharePoint.Publishing.PublishingWebCollection" /> collection.</para>
<para>The <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> class wraps the <see cref="T:Microsoft.SharePoint.SPWeb" /> class. It also directly exposes the underlying <see cref="T:Microsoft.SharePoint.SPWeb" /> through the <see cref="P:Microsoft.SharePoint.Publishing.PublishingWeb.Web" /> property so that additional <see cref="T:Microsoft.SharePoint.SPWeb" /> functionality can be easily accessed.</para>
<para>The members exposed by this class are optimized for the current <see cref="T:Microsoft.SharePoint.SPSite" /> context. Trying to use methods in the <b>PublishingWeb</b> class to return objects from a different site collection can result in unexpected behaviors, and doing so is not supported.</para>
<para />
</remarks>
<example>
<code>using System;
using System.IO;
using System.Web;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Publishing;
namespace Microsoft.SDK.SharePoint.Samples.PublishingWebSample
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("--------------------------------------");
Console.WriteLine("Starting sample tests execution...");
#region PublishingWeb example
//
// ---------------------------------------------------------------------------------------
// PublishingWeb example
// ---------------------------------------------------------------------------------------
// Passing the full url of a PublishingWeb.
//
// To compile add additional references to
// - System.Web.dll
// - Microsoft.SharePoint.dll
// - Microsoft.SharePoint.Publishing.dll
//
//
// You need to pass one parameter which is the full url of a PublishingWeb.
//
if (args.Length &lt; 1)
{
Console.WriteLine("--------------------------------------");
Console.WriteLine("You need to pass the full url of a PublishingWeb.");
FinishSampleTest();
return;
}
string url = args[0];
//
// The url must be in the correct format.
//
Uri webUri = null;
if (!Uri.TryCreate(url, UriKind.Absolute, out webUri))
{
Console.WriteLine("--------------------------------------");
Console.WriteLine("The url is not in correct format.");
FinishSampleTest();
return;
}
SPSite site = null;
try
{
site = new SPSite(url);
}
catch (FileNotFoundException)
{
Console.WriteLine("--------------------------------------");
Console.WriteLine("The url is not a valid PublishingWeb.");
FinishSampleTest();
return;
}
using (SPWeb web = site.OpenWeb(HttpUtility.UrlDecode(webUri.AbsolutePath)))
{
PublishingWeb area = null;
//
// The url must be the full url of a PublishingWeb.
//
if (!web.Exists || !PublishingWeb.IsPublishingWeb(web))
{
Console.WriteLine("--------------------------------------");
Console.WriteLine("The url is not a valid PublishingWeb.");
FinishSampleTest();
return;
}
area = PublishingWeb.GetPublishingWeb(web);
Console.WriteLine("--------------------------------------");
Console.WriteLine("Print out some properties of the current PublishingWeb:");
PrintPublishingWebProperty(area);
//
// Create a PublishingPage examples:
//
Console.WriteLine("--------------------------------------");
Console.WriteLine("Adding the 1st PublishingPage...");
//
// Create a new PublishingPage using default PageLayout.
//
PublishingPage page1 = area.AddPublishingPage();
Console.WriteLine("Sucessfully added the 1st PublishingPage.");
//
// Check in the 1st PublishingPage.
//
if (page1.ListItem.File.CheckOutType != SPFile.SPCheckOutType.None)
{
Console.WriteLine("Check-in the 1st PublishingPage...");
page1.CheckIn("The PublishingPage page1 1st check in.");
Console.WriteLine("Successfully checked-in the 1st PublishingPage.");
}
Console.WriteLine("--------------------------------------");
Console.WriteLine("Try to add the 2nd PublishingPage using the default PageLayout of the PublishingWeb...");
PageLayout defaultPageLayout = area.DefaultPageLayout;
PublishingPage page2 = null;
string page2Url = area.Web.Url + "/Pages/Page2.aspx";
//
// Get a PublishingPage by its url.
//
Console.WriteLine("--------------------------------------");
Console.WriteLine("First try to see whether the PublisingPage with the same Url already exists:");
page2 = area.GetPublishingPage(page2Url);
Console.WriteLine("The Url of the PublishingPage is :" + page2Url);
if (page2 != null)
{
Console.WriteLine("The PublishingPage with Url {0} already exists.", page2Url);
}
else
{
Console.WriteLine("The PublishingPage with Url {0} does not exist.", page2Url);
Console.WriteLine("Adding the 2nd PublishingPage...");
page2 = area.AddPublishingPage("Page2.aspx", defaultPageLayout);
Console.WriteLine("Sucessfully added the 2nd PublishingPage.");
//
// Check in the 2nd PublishingPage.
//
if (page2.ListItem.File.CheckOutType != SPFile.SPCheckOutType.None)
{
Console.WriteLine("Check-in the 2nd PublishingPage...");
page2.CheckIn("The PublishingPage page2 1st check in.");
Console.WriteLine("Successfully checked-in the 2nd PublishingPage.");
}
}
//
// Get a PublishingPage examples:
//
//
// Get a PublishingPage by its ID.
//
Console.WriteLine("--------------------------------------");
Console.WriteLine("Try to retrieve the PublisingPage by its ID:");
int page1ID = page1.ListItem.ID;
Console.WriteLine("The ID of the PublishingPage is :" + page1ID);
PublishingPage page3 = area.GetPublishingPage(page1ID);
//
// Check out the PublishingPage, and edit its properties, then check it in.
//
if (page3 != null)
{
Console.WriteLine("The PublishingPage with ID {0} is found.", page1ID);
if (page3.ListItem.File.CheckOutType == SPFile.SPCheckOutType.None)
{
Console.WriteLine("Check-out the PublishingPage...");
page3.CheckOut();
Console.WriteLine("Successfully checked-out the PublishingPage.");
}
Console.WriteLine("Updating the title of the PublishingPage to be 'Page3'...");
page3.Title = "Page3";
page3.Update();
Console.WriteLine("Successfully updated the PublishingPage.");
if (page3.ListItem.File.CheckOutType != SPFile.SPCheckOutType.None)
{
Console.WriteLine("Check-in the PublishingPage...");
page3.CheckIn("Update the title to be Page3.");
Console.WriteLine("Successfully checked-in the PublishingPage.");
}
}
//
// Iterate the whole PublishingPage List.
//
Console.WriteLine("--------------------------------------");
Console.WriteLine("Iterate through the Pages library:");
area.IterateOverAllPages(
delegate(PublishingPage page)
{
PrintPageUrl(page);
});
}
if (site != null)
{
site.Close();
}
#endregion
Console.WriteLine("--------------------------------------");
Console.WriteLine("Sample tests completed.");
FinishSampleTest();
}
static void PrintPublishingWebProperty(PublishingWeb area)
{
PrintPublishingWebProperty(area, "ImagesLibrary", area.ImagesLibrary.Title);
PrintPublishingWebProperty(area, "DocumentsLibrary", area.DocumentsLibrary.Title);
}
static void PrintPublishingWebProperty(PublishingWeb area, string propertyName, string propertyValue)
{
Console.WriteLine("The property {0} of PublishingWeb {1} is: {2}.", propertyName, area.Name, propertyValue);
}
static void PrintPageUrl(PublishingPage page)
{
Console.WriteLine("The Url of PublishingPage " + page.Name + " is " + page.Url + ".");
}
static void FinishSampleTest()
{
Console.WriteLine("--------------------------------------");
Console.WriteLine("Press any key to continue...");
Console.ReadKey();
}
}
}</code>
<code>// Access the Pages list information without creating a PublishingWeb
// object.
using (SPSite site = new SPSite("http://myteam/team/"))
{
using (SPWeb web = site.OpenWeb())
{
if (PublishingWeb.IsPublishingWeb(web))
{
// Get the ID for the Pages list if we
// know that Web is a PublishingWeb.
Guid pagesListId = PublishingWeb.GetPagesListId(web);
// Get the list by way of the ID.
SPList pagesList = web.Lists[pagesListId];
// Get the Pages list URL. Note:
// PublishingWeb.GetPagesListName(web)
// is equivalent to pagesList.RootFolder.Url.
string pagesListUrl = PublishingWeb.GetPagesListName(web);
}
else
{
// If the SPWeb is not a PublishingWeb,
// then GetPagesListName returns the URL
// that would be used by the Pages list
// if the Publishing feature were to be
// activated.
string pagesListName = PublishingWeb.GetPagesListName(web);
}
}
}
// You can also create a PublishingWeb and access
// the properties from it.
using (SPSite site = new SPSite("http://myteam/"))
{
using (SPWeb web = site.OpenWeb())
{
PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web);
// Get the ID for the Pages list.
Guid pagesListId = publishingWeb.PagesListId;
SPList pagesList = publishingWeb.PagesList;
// The PublishingWeb.PagesListName is equivalent
// to PublishingWeb.PagesList.RootFolder.Url.
string pagesListUrl = publishingWeb.PagesListName;
}
}</code>
<code>' Access the Pages list information without creating a PublishingWeb
' object.
Using site As New SPSite("http://myteam/team/")
Using web As SPWeb = site.OpenWeb()
If PublishingWeb.IsPublishingWeb(web) Then
' Get the ID for the Pages list if we
' know that Web is a PublishingWeb.
Dim pagesListId As Guid = PublishingWeb.GetPagesListId(web)
' Get the list by way of the ID.
Dim pagesList As SPList = web.Lists(pagesListId)
' Get the Pages list URL. Note:
' PublishingWeb.GetPagesListName(web)
' is equivalent to pagesList.RootFolder.Url.
Dim pagesListUrl As String = PublishingWeb.GetPagesListName(web)
Else
' If the SPWeb is not a PublishingWeb,
' then GetPagesListName returns the URL
' that would be used by the Pages list
' if the Publishing feature were to be
' activated.
Dim pagesListName As String = PublishingWeb.GetPagesListName(web)
End If
End Using
End Using
' You can also create a PublishingWeb and access
' the properties from it.
Using site As New SPSite("http://myteam/")
Using web As SPWeb = site.OpenWeb()
Dim publishingWeb As PublishingWeb = PublishingWeb.GetPublishingWeb(web)
' Get the ID for the Pages list.
Dim pagesListId As Guid = publishingWeb.PagesListId
Dim pagesList As SPList = publishingWeb.PagesList
' The PublishingWeb.PagesListName is equivalent
' to PublishingWeb.PagesList.RootFolder.Url.
Dim pagesListUrl As String = publishingWeb.PagesListName
End Using
End Using</code>
</example>
</Docs>
<Members>
<Member MemberName="AddPublishingPage">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.SharePoint.Publishing.PublishingWeb.AddPublishingPage" />
<MemberSignature Language="VB.NET" Value="Public Function AddPublishingPage () As PublishingPage" />
<MemberSignature Language="C++ CLI" Value="public:
 Microsoft::SharePoint::Publishing::PublishingPage ^ AddPublishingPage();" />
<MemberSignature Language="F#" Value="member this.AddPublishingPage : unit -> Microsoft.SharePoint.Publishing.PublishingPage" Usage="publishingWeb.AddPublishingPage " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.Publishing.PublishingPage</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a new <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> object in the <b>PublishingWeb</b>.</summary>
<returns>Returns <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddPublishingPage">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage (string name, Microsoft.SharePoint.Publishing.PageLayout layout);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage(string name, class Microsoft.SharePoint.Publishing.PageLayout layout) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.SharePoint.Publishing.PublishingWeb.AddPublishingPage(System.String,Microsoft.SharePoint.Publishing.PageLayout)" />
<MemberSignature Language="VB.NET" Value="Public Function AddPublishingPage (name As String, layout As PageLayout) As PublishingPage" />
<MemberSignature Language="C++ CLI" Value="public:
 Microsoft::SharePoint::Publishing::PublishingPage ^ AddPublishingPage(System::String ^ name, Microsoft::SharePoint::Publishing::PageLayout ^ layout);" />
<MemberSignature Language="F#" Value="member this.AddPublishingPage : string * Microsoft.SharePoint.Publishing.PageLayout -> Microsoft.SharePoint.Publishing.PublishingPage" Usage="publishingWeb.AddPublishingPage (name, layout)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.Publishing.PublishingPage</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="layout" Type="Microsoft.SharePoint.Publishing.PageLayout" />
</Parameters>
<Docs>
<param name="name">The name of the new <b>PublishingPage</b> object.</param>
<param name="layout">The layout template (<see cref="T:Microsoft.SharePoint.SPFile" />) used to render the new <b>PublishingPage</b> object.</param>
<summary>Creates a new <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> object in the <b>PublishingWeb</b>.</summary>
<returns>Returns <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddPublishingPage">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage (string name, Microsoft.SharePoint.Publishing.PageLayout layout, Microsoft.SharePoint.SPFolder folder);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage(string name, class Microsoft.SharePoint.Publishing.PageLayout layout, class Microsoft.SharePoint.SPFolder folder) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.SharePoint.Publishing.PublishingWeb.AddPublishingPage(System.String,Microsoft.SharePoint.Publishing.PageLayout,Microsoft.SharePoint.SPFolder)" />
<MemberSignature Language="VB.NET" Value="Public Function AddPublishingPage (name As String, layout As PageLayout, folder As SPFolder) As PublishingPage" />
<MemberSignature Language="C++ CLI" Value="public:
 Microsoft::SharePoint::Publishing::PublishingPage ^ AddPublishingPage(System::String ^ name, Microsoft::SharePoint::Publishing::PageLayout ^ layout, Microsoft::SharePoint::SPFolder ^ folder);" />
<MemberSignature Language="F#" Value="member this.AddPublishingPage : string * Microsoft.SharePoint.Publishing.PageLayout * Microsoft.SharePoint.SPFolder -> Microsoft.SharePoint.Publishing.PublishingPage" Usage="publishingWeb.AddPublishingPage (name, layout, folder)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.Publishing.PublishingPage</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="layout" Type="Microsoft.SharePoint.Publishing.PageLayout" />
<Parameter Name="folder" Type="Microsoft.SharePoint.SPFolder" />
</Parameters>
<Docs>
<param name="name">The name of the new <b>PublishingPage</b> object.</param>
<param name="layout">The layout template (<see cref="T:Microsoft.SharePoint.SPFile" />) used to render the new <b>PublishingPage</b> object.</param>
<param name="folder">The layout folder (<see cref="T:Microsoft.SharePoint.SPFolder" />) object that is used to store the new <b>PublishingPage</b> object.</param>
<summary>Creates a new <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> object in the <b>PublishingWeb</b>.</summary>
<returns>Returns <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddPublishingPage">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage (string newPageName, Microsoft.SharePoint.SPFile fileToConvert, Guid transformerId, Microsoft.SharePoint.Publishing.PageConversionPriority priority);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage(string newPageName, class Microsoft.SharePoint.SPFile fileToConvert, valuetype System.Guid transformerId, valuetype Microsoft.SharePoint.Publishing.PageConversionPriority priority) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.SharePoint.Publishing.PublishingWeb.AddPublishingPage(System.String,Microsoft.SharePoint.SPFile,System.Guid,Microsoft.SharePoint.Publishing.PageConversionPriority)" />
<MemberSignature Language="VB.NET" Value="Public Function AddPublishingPage (newPageName As String, fileToConvert As SPFile, transformerId As Guid, priority As PageConversionPriority) As PublishingPage" />
<MemberSignature Language="C++ CLI" Value="public:
 Microsoft::SharePoint::Publishing::PublishingPage ^ AddPublishingPage(System::String ^ newPageName, Microsoft::SharePoint::SPFile ^ fileToConvert, Guid transformerId, Microsoft::SharePoint::Publishing::PageConversionPriority priority);" />
<MemberSignature Language="F#" Value="member this.AddPublishingPage : string * Microsoft.SharePoint.SPFile * Guid * Microsoft.SharePoint.Publishing.PageConversionPriority -> Microsoft.SharePoint.Publishing.PublishingPage" Usage="publishingWeb.AddPublishingPage (newPageName, fileToConvert, transformerId, priority)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Obsolete("This member is obsolete - use the specialized Office services instead for conversions", false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.Publishing.PublishingPage</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="newPageName" Type="System.String" />
<Parameter Name="fileToConvert" Type="Microsoft.SharePoint.SPFile" />
<Parameter Name="transformerId" Type="System.Guid" />
<Parameter Name="priority" Type="Microsoft.SharePoint.Publishing.PageConversionPriority" />
</Parameters>
<Docs>
<param name="newPageName">The name for the new <b>PublishingPage</b> object.</param>
<param name="fileToConvert">The file to convert to get the page content.</param>
<param name="transformerId">The document transformer ID to use for the conversion.</param>
<param name="priority">Priority level for the conversion.</param>
<summary>Creates a new <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> object in the <b>PublishingWeb</b>.</summary>
<returns>Returns <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddPublishingPage">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage (string newPageName, Microsoft.SharePoint.SPFile fileToConvert, Guid transformerId, Microsoft.SharePoint.Publishing.PageConversionPriority priority, Microsoft.SharePoint.SPFolder folder);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage(string newPageName, class Microsoft.SharePoint.SPFile fileToConvert, valuetype System.Guid transformerId, valuetype Microsoft.SharePoint.Publishing.PageConversionPriority priority, class Microsoft.SharePoint.SPFolder folder) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.SharePoint.Publishing.PublishingWeb.AddPublishingPage(System.String,Microsoft.SharePoint.SPFile,System.Guid,Microsoft.SharePoint.Publishing.PageConversionPriority,Microsoft.SharePoint.SPFolder)" />
<MemberSignature Language="VB.NET" Value="Public Function AddPublishingPage (newPageName As String, fileToConvert As SPFile, transformerId As Guid, priority As PageConversionPriority, folder As SPFolder) As PublishingPage" />
<MemberSignature Language="C++ CLI" Value="public:
 Microsoft::SharePoint::Publishing::PublishingPage ^ AddPublishingPage(System::String ^ newPageName, Microsoft::SharePoint::SPFile ^ fileToConvert, Guid transformerId, Microsoft::SharePoint::Publishing::PageConversionPriority priority, Microsoft::SharePoint::SPFolder ^ folder);" />
<MemberSignature Language="F#" Value="member this.AddPublishingPage : string * Microsoft.SharePoint.SPFile * Guid * Microsoft.SharePoint.Publishing.PageConversionPriority * Microsoft.SharePoint.SPFolder -> Microsoft.SharePoint.Publishing.PublishingPage" Usage="publishingWeb.AddPublishingPage (newPageName, fileToConvert, transformerId, priority, folder)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Obsolete("This member is obsolete - use the specialized Office services instead for conversions", false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.Publishing.PublishingPage</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="newPageName" Type="System.String" />
<Parameter Name="fileToConvert" Type="Microsoft.SharePoint.SPFile" />
<Parameter Name="transformerId" Type="System.Guid" />
<Parameter Name="priority" Type="Microsoft.SharePoint.Publishing.PageConversionPriority" />
<Parameter Name="folder" Type="Microsoft.SharePoint.SPFolder" />
</Parameters>
<Docs>
<param name="newPageName">The name for the new <b>PublishingPage</b> object.</param>
<param name="fileToConvert">The name of the file to convert to get the page content.</param>
<param name="transformerId">The document transformer ID to use for the document conversion.</param>
<param name="priority">The priority level of the conversion.</param>
<param name="folder">The folder that contains this new <b>PublishingPage</b> object.</param>
<summary>Creates a new <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> object in the <b>PublishingWeb</b>.</summary>
<returns>Returns <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddPublishingPage">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage (string newPageName, Microsoft.SharePoint.SPFile fileToConvert, Guid transformerId, string configXml, Microsoft.SharePoint.Publishing.PageConversionPriority priority);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage(string newPageName, class Microsoft.SharePoint.SPFile fileToConvert, valuetype System.Guid transformerId, string configXml, valuetype Microsoft.SharePoint.Publishing.PageConversionPriority priority) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.SharePoint.Publishing.PublishingWeb.AddPublishingPage(System.String,Microsoft.SharePoint.SPFile,System.Guid,System.String,Microsoft.SharePoint.Publishing.PageConversionPriority)" />
<MemberSignature Language="VB.NET" Value="Public Function AddPublishingPage (newPageName As String, fileToConvert As SPFile, transformerId As Guid, configXml As String, priority As PageConversionPriority) As PublishingPage" />
<MemberSignature Language="C++ CLI" Value="public:
 Microsoft::SharePoint::Publishing::PublishingPage ^ AddPublishingPage(System::String ^ newPageName, Microsoft::SharePoint::SPFile ^ fileToConvert, Guid transformerId, System::String ^ configXml, Microsoft::SharePoint::Publishing::PageConversionPriority priority);" />
<MemberSignature Language="F#" Value="member this.AddPublishingPage : string * Microsoft.SharePoint.SPFile * Guid * string * Microsoft.SharePoint.Publishing.PageConversionPriority -> Microsoft.SharePoint.Publishing.PublishingPage" Usage="publishingWeb.AddPublishingPage (newPageName, fileToConvert, transformerId, configXml, priority)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.Publishing.PublishingPage</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="newPageName" Type="System.String" />
<Parameter Name="fileToConvert" Type="Microsoft.SharePoint.SPFile" />
<Parameter Name="transformerId" Type="System.Guid" />
<Parameter Name="configXml" Type="System.String" />
<Parameter Name="priority" Type="Microsoft.SharePoint.Publishing.PageConversionPriority" />
</Parameters>
<Docs>
<param name="newPageName">The name for the new <b>PublishingPage</b> object.</param>
<param name="fileToConvert">The name of the file to convert to get the page content.</param>
<param name="transformerId">The document transformer ID to use for the document conversion.</param>
<param name="configXml">The settings to use for the conversion.</param>
<param name="priority">The priority level of the conversion.</param>
<summary>Creates a new <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> object in the <b>PublishingWeb</b>.</summary>
<returns>Returns <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddPublishingPage">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage (string newPageName, Microsoft.SharePoint.SPFile fileToConvert, Guid transformerId, string configXml, Microsoft.SharePoint.Publishing.PageConversionPriority priority, Microsoft.SharePoint.SPFolder folder);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.SharePoint.Publishing.PublishingPage AddPublishingPage(string newPageName, class Microsoft.SharePoint.SPFile fileToConvert, valuetype System.Guid transformerId, string configXml, valuetype Microsoft.SharePoint.Publishing.PageConversionPriority priority, class Microsoft.SharePoint.SPFolder folder) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.SharePoint.Publishing.PublishingWeb.AddPublishingPage(System.String,Microsoft.SharePoint.SPFile,System.Guid,System.String,Microsoft.SharePoint.Publishing.PageConversionPriority,Microsoft.SharePoint.SPFolder)" />
<MemberSignature Language="VB.NET" Value="Public Function AddPublishingPage (newPageName As String, fileToConvert As SPFile, transformerId As Guid, configXml As String, priority As PageConversionPriority, folder As SPFolder) As PublishingPage" />
<MemberSignature Language="C++ CLI" Value="public:
 Microsoft::SharePoint::Publishing::PublishingPage ^ AddPublishingPage(System::String ^ newPageName, Microsoft::SharePoint::SPFile ^ fileToConvert, Guid transformerId, System::String ^ configXml, Microsoft::SharePoint::Publishing::PageConversionPriority priority, Microsoft::SharePoint::SPFolder ^ folder);" />
<MemberSignature Language="F#" Value="member this.AddPublishingPage : string * Microsoft.SharePoint.SPFile * Guid * string * Microsoft.SharePoint.Publishing.PageConversionPriority * Microsoft.SharePoint.SPFolder -> Microsoft.SharePoint.Publishing.PublishingPage" Usage="publishingWeb.AddPublishingPage (newPageName, fileToConvert, transformerId, configXml, priority, folder)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.Publishing.PublishingPage</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="newPageName" Type="System.String" />
<Parameter Name="fileToConvert" Type="Microsoft.SharePoint.SPFile" />
<Parameter Name="transformerId" Type="System.Guid" />
<Parameter Name="configXml" Type="System.String" />
<Parameter Name="priority" Type="Microsoft.SharePoint.Publishing.PageConversionPriority" />
<Parameter Name="folder" Type="Microsoft.SharePoint.SPFolder" />
</Parameters>
<Docs>
<param name="newPageName">The name for the new <b>PublishingPage</b> object.</param>
<param name="fileToConvert">The name of the file to convert to get the page content.</param>
<param name="transformerId">The document transformer ID to use for the document conversion.</param>
<param name="configXml">The settings to use for the conversion.</param>
<param name="priority">The priority level of the conversion.</param>
<param name="folder">The folder that contains this new <b>PublishingPage</b> object.</param>
<summary>Creates a new <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> object in the <b>PublishingWeb</b>.</summary>
<returns>Returns <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AllowAllPageLayouts">
<MemberSignature Language="C#" Value="public void AllowAllPageLayouts (bool resetAllSubsitesToInherit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AllowAllPageLayouts(bool resetAllSubsitesToInherit) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.SharePoint.Publishing.PublishingWeb.AllowAllPageLayouts(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub AllowAllPageLayouts (resetAllSubsitesToInherit As Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:
 void AllowAllPageLayouts(bool resetAllSubsitesToInherit);" />
<MemberSignature Language="F#" Value="member this.AllowAllPageLayouts : bool -> unit" Usage="publishingWeb.AllowAllPageLayouts resetAllSubsitesToInherit" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="resetAllSubsitesToInherit" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="resetAllSubsitesToInherit">This Boolean parameter indicates whether the available <see cref="T:Microsoft.SharePoint.Publishing.PageLayout" /> objects are pushed down to all subsites.</param>
<summary>Resets the available <see cref="T:Microsoft.SharePoint.Publishing.PageLayout" /> objects on this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> to the complete set of layouts.</summary>
<remarks>
<para>After calling this method, the <see cref="M:Microsoft.SharePoint.Publishing.PublishingWeb.GetAvailablePageLayouts" /> method returns the complete set of <see cref="T:Microsoft.SharePoint.Publishing.PageLayout" /> objects. The <see cref="P:Microsoft.SharePoint.Publishing.PublishingWeb.IsInheritingAvailablePageLayouts" /> property is set to <b>false</b>. The <see cref="P:Microsoft.SharePoint.Publishing.PublishingWeb.IsAllowingAllPageLayouts" /> property is set to True.</para>
<para>After calling this method, you should call the <see cref="M:Microsoft.SharePoint.Publishing.PublishingWeb.Update" /> method to save the changes.</para>
<para>
<b>Note</b>: This operation is synchronous.</para>
<para />
</remarks>
<exception cref="System.UnauthorizedAccessException">The current user does not have sufficient permissions to perform this action.</exception>
</Docs>
</Member>
<Member MemberName="AllowAllWebTemplates">
<MemberSignature Language="C#" Value="public void AllowAllWebTemplates (bool resetAllSubsitesToInherit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AllowAllWebTemplates(bool resetAllSubsitesToInherit) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.SharePoint.Publishing.PublishingWeb.AllowAllWebTemplates(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub AllowAllWebTemplates (resetAllSubsitesToInherit As Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:
 void AllowAllWebTemplates(bool resetAllSubsitesToInherit);" />
<MemberSignature Language="F#" Value="member this.AllowAllWebTemplates : bool -> unit" Usage="publishingWeb.AllowAllWebTemplates resetAllSubsitesToInherit" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="resetAllSubsitesToInherit" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="resetAllSubsitesToInherit">This Boolean parameter indicates whether the available Web templates should be pushed down to all subsites.</param>
<summary>Resets the available Web templates on this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object to the complete set of Web templates.</summary>
<remarks>
<para>After calling this method, the <see cref="M:Microsoft.SharePoint.Publishing.PublishingWeb.GetAvailableWebTemplates(System.UInt32)" /> method returns the complete set of Web templates for a given language. The <see cref="P:Microsoft.SharePoint.Publishing.PublishingWeb.IsInheritingAvailableWebTemplates" /> property is set to <b>false</b>. The <see cref="P:Microsoft.SharePoint.Publishing.PublishingWeb.IsAllowingAllWebTemplates" /> property is set to True.</para>
<para>After calling this method, you should call the <see cref="M:Microsoft.SharePoint.Publishing.PublishingWeb.Update" /> method to save changes. </para>
<para>
<b>Note</b>: This operation is synchronous.</para>
<para />
</remarks>
<exception cref="Microsoft.SharePoint.SPException">The available Web template property pushdown failed for some Web sites.</exception>
<exception cref="System.UnauthorizedAccessException">The current user does not have sufficient permissions to perform this action.</exception>
</Docs>
</Member>
<Member MemberName="AlternateCssUrl">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.Publishing.InheritableStringProperty AlternateCssUrl { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.SharePoint.Publishing.InheritableStringProperty AlternateCssUrl" />
<MemberSignature Language="DocId" Value="P:Microsoft.SharePoint.Publishing.PublishingWeb.AlternateCssUrl" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AlternateCssUrl As InheritableStringProperty" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::SharePoint::Publishing::InheritableStringProperty ^ AlternateCssUrl { Microsoft::SharePoint::Publishing::InheritableStringProperty ^ get(); };" />
<MemberSignature Language="F#" Value="member this.AlternateCssUrl : Microsoft.SharePoint.Publishing.InheritableStringProperty" Usage="Microsoft.SharePoint.Publishing.PublishingWeb.AlternateCssUrl" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.Publishing.InheritableStringProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the URL that points to the alternate cascading style sheets (CSS) file for this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object.</summary>
<value>The URL that points to the alternate CSS file associated with this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AnonymousPageCacheProfileId">
<MemberSignature Language="C#" Value="public int AnonymousPageCacheProfileId { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 AnonymousPageCacheProfileId" />
<MemberSignature Language="DocId" Value="P:Microsoft.SharePoint.Publishing.PublishingWeb.AnonymousPageCacheProfileId" />
<MemberSignature Language="VB.NET" Value="Public Property AnonymousPageCacheProfileId As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 property int AnonymousPageCacheProfileId { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.AnonymousPageCacheProfileId : int with get, set" Usage="Microsoft.SharePoint.Publishing.PublishingWeb.AnonymousPageCacheProfileId" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the identifier (ID) of the ASP.NET output cache profile for this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object.</summary>
<value>An integer representing the <paramref name="ID" /> of the cache profile. A value of <paramref name="-1" /> indicates that the profile should be inherited from a parent <b>PublishingWeb</b> object if possible.</value>
<remarks>
<para>Use this property to determine if and how <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> objects that are contained by the <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> class should be cached in the ASP.NET output cache.</para>
<para>To save changes after setting this property, call the <see cref="M:Microsoft.SharePoint.Publishing.PublishingWeb.Update" /> method.</para>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="Audience">
<MemberSignature Language="C#" Value="public string Audience { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Audience" />
<MemberSignature Language="DocId" Value="P:Microsoft.SharePoint.Publishing.PublishingWeb.Audience" />
<MemberSignature Language="VB.NET" Value="Public Property Audience As String" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Audience { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Audience : string with get, set" Usage="Microsoft.SharePoint.Publishing.PublishingWeb.Audience" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a string representing the audience whom this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> targets.</summary>
<value>A string representing the audience whom this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> targets.To save changes after setting this property, call the <see cref="M:Microsoft.SharePoint.Publishing.PublishingWeb.Update" /> method.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AuthenticatedPageCacheProfileId">
<MemberSignature Language="C#" Value="public int AuthenticatedPageCacheProfileId { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 AuthenticatedPageCacheProfileId" />
<MemberSignature Language="DocId" Value="P:Microsoft.SharePoint.Publishing.PublishingWeb.AuthenticatedPageCacheProfileId" />
<MemberSignature Language="VB.NET" Value="Public Property AuthenticatedPageCacheProfileId As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 property int AuthenticatedPageCacheProfileId { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.AuthenticatedPageCacheProfileId : int with get, set" Usage="Microsoft.SharePoint.Publishing.PublishingWeb.AuthenticatedPageCacheProfileId" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the identifier (ID) of the authenticated page output cache profile for this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object.</summary>
<value>An integer representing the ID of the cache profile. A value of <paramref name="-1" /> indicates that the profile should be inherited from a parent <b>PublishingWeb</b> object if possible.</value>
<remarks>
<para>Use this property to determine if and how <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> objects that are contained by the <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object should be cached in the ASP.NET output cache for authenticated users.</para>
<para>To save changes after setting this property, call the <see cref="M:Microsoft.SharePoint.Publishing.PublishingWeb.Update" /> method.</para>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="Close">
<MemberSignature Language="C#" Value="public void Close ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Close() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.SharePoint.Publishing.PublishingWeb.Close" />
<MemberSignature Language="VB.NET" Value="Public Sub Close ()" />
<MemberSignature Language="C++ CLI" Value="public:
 void Close();" />
<MemberSignature Language="F#" Value="member this.Close : unit -> unit" Usage="publishingWeb.Close " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Closes the wrapped <see cref="T:Microsoft.SharePoint.SPWeb" /> object if it was instantiated internally.</summary>
<remarks>
<para>To close the underlying wrapped <see cref="T:Microsoft.SharePoint.SPWeb" /> object, call the <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb.Web.Close" /> method instead of this one. This method only closes the underlying <see cref="T:Microsoft.SharePoint.SPWeb" /> if it was instantiated internally.</para>
<para>After calling this method, you should call the <see cref="M:Microsoft.SharePoint.Publishing.PublishingWeb.Update" /> method to save changes.</para>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="CreatedBy">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.SPUser CreatedBy { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.SharePoint.SPUser CreatedBy" />
<MemberSignature Language="DocId" Value="P:Microsoft.SharePoint.Publishing.PublishingWeb.CreatedBy" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CreatedBy As SPUser" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::SharePoint::SPUser ^ CreatedBy { Microsoft::SharePoint::SPUser ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CreatedBy : Microsoft.SharePoint.SPUser" Usage="Microsoft.SharePoint.Publishing.PublishingWeb.CreatedBy" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.SPUser</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:Microsoft.SharePoint.SPUser" /> who created this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object.</summary>
<value>The <see cref="T:Microsoft.SharePoint.SPUser" /> who created this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" />.</value>
<remarks>
<para>This property wraps the <see cref="P:Microsoft.SharePoint.SPWeb.Author" />.property.</para>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="CreatedDate">
<MemberSignature Language="C#" Value="public DateTime CreatedDate { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.DateTime CreatedDate" />
<MemberSignature Language="DocId" Value="P:Microsoft.SharePoint.Publishing.PublishingWeb.CreatedDate" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CreatedDate As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:
 property DateTime CreatedDate { DateTime get(); };" />
<MemberSignature Language="F#" Value="member this.CreatedDate : DateTime" Usage="Microsoft.SharePoint.Publishing.PublishingWeb.CreatedDate" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the date and time that this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> was created.</summary>
<value>The date and time that this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> was created.</value>
<remarks>
<para>This property wraps the <see cref="P:Microsoft.SharePoint.SPWeb.Created" /> property.</para>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="CustomMasterUrl">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.Publishing.InheritableStringProperty CustomMasterUrl { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.SharePoint.Publishing.InheritableStringProperty CustomMasterUrl" />
<MemberSignature Language="DocId" Value="P:Microsoft.SharePoint.Publishing.PublishingWeb.CustomMasterUrl" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CustomMasterUrl As InheritableStringProperty" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::SharePoint::Publishing::InheritableStringProperty ^ CustomMasterUrl { Microsoft::SharePoint::Publishing::InheritableStringProperty ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CustomMasterUrl : Microsoft.SharePoint.Publishing.InheritableStringProperty" Usage="Microsoft.SharePoint.Publishing.PublishingWeb.CustomMasterUrl" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.Publishing.InheritableStringProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the custom master URL for this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object.</summary>
<value>The custom master URL for this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object.</value>
<remarks>
<para>This value may be inherited.</para>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="DefaultDefaultPageName">
<MemberSignature Language="C#" Value="public static string DefaultDefaultPageName { get; }" />
<MemberSignature Language="ILAsm" Value=".property string DefaultDefaultPageName" />
<MemberSignature Language="DocId" Value="P:Microsoft.SharePoint.Publishing.PublishingWeb.DefaultDefaultPageName" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly Property DefaultDefaultPageName As String" />
<MemberSignature Language="C++ CLI" Value="public:
 static property System::String ^ DefaultDefaultPageName { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DefaultDefaultPageName : string" Usage="Microsoft.SharePoint.Publishing.PublishingWeb.DefaultDefaultPageName" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the default URL name for the Welcome page for this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object.</summary>
<value>The default URL name of this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" />.object's Welcome page.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DefaultPage">
<MemberSignature Language="C#" Value="public Microsoft.SharePoint.SPFile DefaultPage { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.SharePoint.SPFile DefaultPage" />
<MemberSignature Language="DocId" Value="P:Microsoft.SharePoint.Publishing.PublishingWeb.DefaultPage" />
<MemberSignature Language="VB.NET" Value="Public Property DefaultPage As SPFile" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::SharePoint::SPFile ^ DefaultPage { Microsoft::SharePoint::SPFile ^ get(); void set(Microsoft::SharePoint::SPFile ^ value); };" />
<MemberSignature Language="F#" Value="member this.DefaultPage : Microsoft.SharePoint.SPFile with get, set" Usage="Microsoft.SharePoint.Publishing.PublishingWeb.DefaultPage" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.SharePoint.Publishing</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.SharePoint.SPFile</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets and sets the Welcome page for this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object.</summary>
<value>The <see cref="T:Microsoft.SharePoint.SPFile" /> instance that is used as the Welcome page for this <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" /> object.</value>
<remarks>
<para>This property can only be set to an instance of the <see cref="T:Microsoft.SharePoint.SPFile" /> object within the current <see cref="T:Microsoft.SharePoint.Publishing.PublishingWeb" />. An instance of the <b>SPFile</b> object is returned rather than a <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> object because the Welcome page might not be an instance of the <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" /> class. Use the <see cref="M:Microsoft.SharePoint.Publishing.PublishingPage.IsPublishingPage(Microsoft.SharePoint.SPListItem)" /> method to verify whether this <see cref="T:Microsoft.SharePoint.SPFile" /> is a <see cref="T:Microsoft.SharePoint.Publishing.PublishingPage" />.</para>
<para>This property may return a a null reference (Nothing in Visual Basic) value if a default page has not been explicitly set.</para>
<para>To save changes after setting this property, call the <see cref="M:Microsoft.SharePoint.Publishing.PublishingWeb.Update" /> method.</para>
<para />
</remarks>
<exception cref="System.ArgumentNullException">The value cannot be set to <b>null.</b></exception>
<exception cref="System.ArgumentException">The <see cref="T:Microsoft.SharePoint.SPFile" /> must exist in this site.</exception>
<example>
<para>This example demonstrates setting and saving property values on a publishing Web. Before building and running this example, verify that Publishing feature has been enabled for the <b>SPWeb</b>, and that the <b>defaultPageFileId</b> is <b>SPFile.UniqueId</b> for the new default page.</para>
<code>using SPContentTypeId = Microsoft.SharePoint.SPContentTypeId;
using SPContentType = Microsoft.SharePoint.SPContentType;
using SPSite = Microsoft.SharePoint.SPSite;
using SPFile = Microsoft.SharePoint.SPFile;
using SPWeb = Microsoft.SharePoint.SPWeb;
using PublishingSite = Microsoft.SharePoint.Publishing.PublishingSite;
using PublishingWeb = Microsoft.SharePoint.Publishing.PublishingWeb;
using PageLayoutCollection = Microsoft.SharePoint.Publishing.PageLayoutCollection;
using PageLayout = Microsoft.SharePoint.Publishing.PageLayout;
namespace Microsoft.SDK.SharePointServer.Samples
{
public static class PublishingWebCodeSamples
{
public static void SetPublishingWebProperties(SPWeb web, System.Guid defaultPageFileId)
{
// Replace these variable values and input parameters
// with your own values.
string newTitle = "your Title"; // new PublishingWeb.Title value
string newDescription = "your Description"; // new PublishingWeb.Description value
bool resetInheritPageLayouts = true; // new PublishingWeb.IsInheritingAvailablePageLayouts value
bool resetInheritWebTemplates = true; // new PublishingWeb.IsInheritingAvailableWebTemplates value
// Validate the input parameters.
if (null == web)
{
throw new System.ArgumentNullException("web");
}
// Get the PublishingWeb wrapper for the SPWeb
// that was passed in.
PublishingWeb publishingWeb = null;
if (PublishingWeb.IsPublishingWeb(web))
{
publishingWeb = PublishingWeb.GetPublishingWeb(web);
}
else
{
throw new System.ArgumentException("The SPWeb must be a PublishingWeb", "web");
}
// Retrieve the SPFile.
SPFile newDefaultPageFile = publishingWeb.Web.GetFile(defaultPageFileId);
if( (null == newDefaultPageFile) ||
!newDefaultPageFile.Exists )
{
throw new System.ArgumentException(
"The Guid does not match an SPFile on the SPWeb",
"defaultPageFileId");
}
// Set new values on the PublishingWeb.
publishingWeb.Title = newTitle;
publishingWeb.Description = newDescription;
publishingWeb.DefaultPage = newDefaultPageFile;
if( resetInheritPageLayouts &amp;&amp;
!publishingWeb.IsInheritingAvailablePageLayouts &amp;&amp;
!publishingWeb.IsRoot)
{
publishingWeb.InheritAvailablePageLayouts();
System.Diagnostics.Debug.Assert(publishingWeb.IsInheritingAvailablePageLayouts);
}
if (resetInheritWebTemplates &amp;&amp;
!publishingWeb.IsInheritingAvailableWebTemplates &amp;&amp;
!publishingWeb.IsRoot)
{
publishingWeb.InheritAvailableWebTemplates();
System.Diagnostics.Debug.Assert(publishingWeb.IsInheritingAvailableWebTemplates);
}
// Save the new values on the PublishingWeb.
publishingWeb.Update();
}
}
}</code>
<code>Imports SPContentTypeId = Microsoft.SharePoint.SPContentTypeId
Imports SPContentType = Microsoft.SharePoint.SPContentType
Imports SPSite = Microsoft.SharePoint.SPSite
Imports SPFile = Microsoft.SharePoint.SPFile
Imports SPWeb = Microsoft.SharePoint.SPWeb
Imports PublishingSite = Microsoft.SharePoint.Publishing.PublishingSite
Imports PublishingWeb = Microsoft.SharePoint.Publishing.PublishingWeb
Imports PageLayoutCollection = Microsoft.SharePoint.Publishing.PageLayoutCollection
Imports PageLayout = Microsoft.SharePoint.Publishing.PageLayout
Namespace Microsoft.SDK.SharePointServer.Samples
Public NotInheritable Class PublishingWebCodeSamples
Private Sub New()
End Sub
Public Shared Sub SetPublishingWebProperties(ByVal web As SPWeb, ByVal defaultPageFileId As System.Guid)
' Replace these variable values and input parameters
' with your own values.
Dim newTitle As String = "your Title" ' new PublishingWeb.Title value
Dim newDescription As String = "your Description" ' new PublishingWeb.Description value
Dim resetInheritPageLayouts As Boolean = True ' new PublishingWeb.IsInheritingAvailablePageLayouts value
Dim resetInheritWebTemplates As Boolean = True ' new PublishingWeb.IsInheritingAvailableWebTemplates value
' Validate the input parameters.
If Nothing Is web Then
Throw New System.ArgumentNullException("web")
End If
' Get the PublishingWeb wrapper for the SPWeb
' that was passed in.
Dim publishingWeb As PublishingWeb = Nothing
If PublishingWeb.IsPublishingWeb(web) Then
publishingWeb = PublishingWeb.GetPublishingWeb(web)
Else
Throw New System.ArgumentException("The SPWeb must be a PublishingWeb", "web")
End If
' Retrieve the SPFile.
Dim newDefaultPageFile As SPFile = publishingWeb.Web.GetFile(defaultPageFileId)
If (Nothing Is newDefaultPageFile) OrElse (Not newDefaultPageFile.Exists) Then
Throw New System.ArgumentException("The Guid does not match an SPFile on the SPWeb", "defaultPageFileId")
End If