Skip to content

Commit a658526

Browse files
committed
fix csharp rendering
1 parent 32dc483 commit a658526

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

docs/transform/modernize-userinterface-site-pages-model.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Let's analyze how a web part is configured in the page transformation model, whi
5858

5959
For each web part the model defines the properties that might be useful to configure the target client side web part(s). If you miss certain properties you can simply extend them in the model. On some of the properties you'll see a Functions attribute: this attribute contains one or more functions (separate functions via a ;) that are executed when the source web part is mapped to a target client side web part. The anatomy of a function is the following:
6060

61-
```C#
61+
```csharp
6262
{Output} = FunctionName({Input1}, {Input2})
6363
```
6464

@@ -124,7 +124,7 @@ Add-ons allow you to insert your custom logic into the mapping model by followin
124124

125125
To create your own functions you'll need to reference the SharePoint.Modernization.Framework assembly in your project and then create a class inheriting the `SharePoint.Modernization.Framework.Functions.FunctionsBase` class:
126126

127-
```C#
127+
```csharp
128128
using Microsoft.SharePoint.Client;
129129
using SharePoint.Modernization.Framework.Functions;
130130
using System;

docs/transform/modernize-userinterface-site-pages.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The `webpartmapping.xml` and `webpartmapping_latestfrompackage.xml` represent th
3535

3636
With the mapping file in place you now can use below snippet (coming from the [Modernization.PageTransformation sample on GitHub](https://github.com/SharePoint/PnP/tree/dev/Samples/Modernization.PageTransformation)) to transform all the pages in a given site:
3737

38-
```C#
38+
```csharp
3939
string siteUrl = "https://contoso.sharepoint.com/sites/mytestsite";
4040
string userName = "[email protected]";
4141
AuthenticationManager am = new AuthenticationManager();
@@ -49,17 +49,8 @@ using (var cc = am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userNa
4949
{
5050
// If target page exists, then overwrite it
5151
Overwrite = true,
52-
// Migrated page gets the name of the original page (default = false)
53-
//TargetPageTakesSourcePageName = false,
54-
// Give the migrated page a specific prefix (default is Migrated_)
55-
//TargetPagePrefix = "Yes_",
56-
// Configure the page header, empty value means ClientSidePageHeaderType.None (default = null)
57-
//PageHeader = new ClientSidePageHeader(cc, ClientSidePageHeaderType.None, null),
58-
// If the page is a home page then replace with stock home page (default = false)
59-
//ReplaceHomePageWithDefaultHomePage = true,
60-
// Replace images and iframes embedded inside a list or table in the wiki text with a placeholder and add respective images and video web parts at the bottom of the page (default = true)
61-
//HandleWikiImagesAndVideos = false,
6252
};
53+
6354
try
6455
{
6556
Console.WriteLine($"Transforming page {page.FieldValues["FileLeafRef"]}");

0 commit comments

Comments
 (0)