You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/transform/modernize-userinterface-site-pages-approach.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Understanding in-place page transformation versus cross-site page transformation
3
3
description: Explains the differences between in-place and cross-site page transformation and when to use which one
4
-
ms.date: 02/06/2020
4
+
ms.date: 02/11/2021
5
5
ms.prod: sharepoint
6
6
localization_priority: Priority
7
7
---
@@ -18,19 +18,19 @@ Overall in-place transformation will give you the best results as there's no ris
18
18
19
19
## Cross-site transformation
20
20
21
-
Cross site page transformation will read the classic page (e.g. mypage.aspx) and will then create the modern page (e.g. mypage.aspx) in **another** site collection. Typical use case of cross-site transformation is for transforming page types which cannot be used together with modern pages in the same site: this applies to classic publishing pages, blog pages and Delve blog pages. Another important use case is when you transform on-premises pages: given page transformation only supports SharePoint Online as the target platform for modern pages, this means these transformations are cross-site page transformations.
21
+
Cross site page transformation will read the classic page (e.g. mypage.aspx) and will then create the modern page (e.g. mypage.aspx) in **another** site collection. Typical use case of cross-site transformation is for transforming page types which cannot be used together with modern pages in the same site: this applies to classic publishing pagesand blog pages. Another important use case is when you transform on-premises pages: given page transformation only supports SharePoint Online as the target platform for modern pages, this means these transformations are cross-site page transformations.
22
22
23
23
## In-place transformation versus cross-site transformation
24
24
25
25
Below table provides an overview on whether you need to use in-place transformation, cross-site transformation or whether you can choose.
26
26
27
-
Source\Type | Wiki page | Web part page | Publishing page | Blog page | Delve blog page
Copy file name to clipboardExpand all lines: docs/transform/modernize-userinterface-site-pages-configuration.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Options to control the page transformation process
3
3
description: Explains how to configure the page transformation process
4
-
ms.date: 03/06/2020
4
+
ms.date: 02/11/2021
5
5
ms.prod: sharepoint
6
6
localization_priority: Normal
7
7
---
@@ -11,7 +11,7 @@ localization_priority: Normal
11
11
When you use the page transformation framework you do have a lot of control on how the page transformation is done. The model to control this is by specifying the correct configuration as part of the `PageTransformationInformation` instance for wiki and web part pages or a `PublishingPageTransformationInformation` instance for publishing pages. The created transformation instance is what you use to launch page transformation. In this article you'll learn more about the available options.
12
12
13
13
> [!IMPORTANT]
14
-
> The SharePoint PnP Modernization framework is continuously evolving, checkout [the release notes](https://github.com/SharePoint/sp-dev-modernization/tree/master/Tools/SharePoint.Modernization/Modernization%20Framework%20release%20notes.md) to stay up to date on the latest changes. If you encounter problems please file an issue in the [sp-dev-modernization GitHub issue list](https://github.com/SharePoint/sp-dev-modernization/issues).
14
+
> SharePoint PnP Modernization is part of the [PnP Framework](https://github.com/pnp/pnpframework) and is continuously evolving, checkout [the release notes](https://github.com/pnp/pnpframework/blob/dev/src/lib/CHANGELOG.md) to stay up to date on the latest changes. If you encounter problems please file an issue in the [PnP Framework GitHub issue list](https://github.com/pnp/pnpframework/issues).
Copy file name to clipboardExpand all lines: docs/transform/modernize-userinterface-site-pages-dotnet.md
+25-72Lines changed: 25 additions & 72 deletions
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,31 @@
1
1
---
2
2
title: Transform classic pages to modern pages using .NET
3
3
description: Explains how to transform classic wiki and web part pages into modern modern pages using the SharePoint .NET
4
-
ms.date: 06/05/2020
4
+
ms.date: 02/11/2021
5
5
ms.prod: sharepoint
6
6
localization_priority: Normal
7
7
---
8
8
9
9
# Transforming to modern site pages using .NET
10
10
11
11
> [!IMPORTANT]
12
-
> The SharePoint PnP Modernization framework is continuously evolving, checkout [the release notes](https://github.com/SharePoint/sp-dev-modernization/tree/master/Tools/SharePoint.Modernization/Modernization%20Framework%20release%20notes.md) to stay up to date on the latest changes. If you encounter problems please file an issue in the [sp-dev-modernization GitHub issue list](https://github.com/SharePoint/sp-dev-modernization/issues).
12
+
> SharePoint PnP Modernization is part of the [PnP Framework](https://github.com/pnp/pnpframework) and is continuously evolving, checkout [the release notes](https://github.com/pnp/pnpframework/blob/dev/src/lib/CHANGELOG.md) to stay up to date on the latest changes. If you encounter problems please file an issue in the [PnP Framework GitHub issue list](https://github.com/pnp/pnpframework/issues).
13
13
14
-
The page transformation engine is built using .NET and is distributed as a [nuget](https://www.nuget.org/packages/SharePointPnPModernizationOnline) package. Once you've added the nuget package you'll see that 2 additional files are added to your solution:
14
+
The page transformation engine is built using .NET and is distributed as a [nuget](https://www.nuget.org/packages/PnP.Framework) package. Once you've added the nuget package you'll see that 2 additional files are added to your solution:
> The minimal .NET Framework version for this solution to work is 4.5.
19
+
> The PnP Framework nuget package contains a .NET Standard 2.0 version and a .NET 5.0 version, allowing you to embed page transformation in any .NET project.
20
20
21
21
The `webpartmapping.xml` and `webpartmapping_latestfrompackage.xml` represent the transformation model that describes how the transformation will happen. You typically will tweak the `webpartmapping.xml` file to your needs by for example adding additional mappings to your own web parts. If you later on install an updated version of the nuget package your `webpartmapping.xml` will not be overwritten by default but the `webpartmapping_latestfrompackage.xml` will be. You can use this latter file to compare the latest out-the-box mapping with your mapping and take over the changes you need.
22
22
23
23
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:
using (varcc=am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userName, GetSecureString("Password")))
27
+
AuthenticationManageram=newAuthenticationManager("<Azure AD client id>", "[email protected]", "Pwd as SecureString");
28
+
using (varcc=am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl))
30
29
{
31
30
varpageTransformator=newPageTransformator(cc);
32
31
varpages=cc.Web.GetPages();
@@ -55,7 +54,7 @@ using (var cc = am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userNa
55
54
56
55
## FAQ
57
56
58
-
### I want to set mapping properties (as of March 2019 release, version 1.0.1903.*)
57
+
### I want to set mapping properties
59
58
60
59
Mapping properties are set to drive mapping behavior (e.g. configure the use of the community script editor). You can configure mapping properties like shown in below sample code:
Consult the [web part transformation list](modernize-userinterface-site-pages-webparts.md) article to learn more on the possible mapping properties.
75
74
76
-
### I want to transform pages into another site collection (as of March 2019 release, version 1.0.1903.*)
75
+
### I want to transform pages into another site collection
77
76
78
77
The default transformation behavior is doing an in-place transformation, meaning the modern page is created in the same ___location as the classic page was. You can however also create the modern version of the page in another site collection by providing a client context object for the target site collection.
using (varcc=am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userName, GetSecureString("Password")))
82
+
AuthenticationManageram=newAuthenticationManager("<Azure AD client id>", "[email protected]", "Pwd as SecureString");
83
+
using (varcc=am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl))
86
84
{
87
85
using (varccTarget=cc.Clone(targetSiteUrl))
88
86
{
@@ -113,16 +111,15 @@ using (var cc = am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userNa
113
111
> [!Note]
114
112
> Not all web parts lend themselves well for a cross site transfer, check the **Cross site support** column in [web part transformation list](modernize-userinterface-site-pages-webparts.md) to learn more.
115
113
116
-
### I want to transform publishing pages (as of April 2019 release, version 1.0.1904.*)
114
+
### I want to transform publishing pages
117
115
118
116
Publishing page transformation always will be a cross site transformation as mixing modern pages with publishing pages is unsupported. Below sample shows how all publishing pages starting with an "a" are transformed to modern pages in the https://contoso.sharepoint.com/sites/mycommunicationsite site. This sample also shows how to provide a custom page layout mapping file.
using (varcc=am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userName, GetSecureString("Password")))
121
+
AuthenticationManageram=newAuthenticationManager("<Azure AD client id>", "[email protected]", "Pwd as SecureString");
122
+
using (varcc=am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl))
126
123
{
127
124
using (varccTarget=cc.Clone(targetSiteUrl))
128
125
{
@@ -153,24 +150,22 @@ using (var cc = am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userNa
153
150
> [!Note]
154
151
> Not all web parts lend themselves well for a cross site transfer, check the **Cross site support** column in [web part transformation list](modernize-userinterface-site-pages-webparts.md) to learn more.
155
152
156
-
157
-
### Read publishing page in on-premises SharePoint and create the modern page in SharePoint Online (as of June 2019 release, version 1.0.1906.*)
153
+
### Read publishing page in on-premises SharePoint and create the modern page in SharePoint Online
158
154
159
155
When you want to bring over your classic on-premises publishing portals you could first move the complete portal from on-premises to a classic portal in SharePoint Online and then do the modernization work. However, often it's easier to directly read the classic publishing page from your SharePoint on-premises portal and create the modern version in SharePoint Online.
@@ -205,21 +200,19 @@ using (var cc = new ClientContext(siteUrl))
205
200
```
206
201
207
202
> [!NOTE]
208
-
> - This feature supports SharePoint 2010, 2013, 2016 and 2019 as source. Target is always SharePoint Online
203
+
> - This feature supports SharePoint 2013, 2016 and 2019 as source. Target is always SharePoint Online
209
204
> - It's important to run your code on a machine that is able to connect to both the on-premises SharePoint server as the SharePoint Online environment
210
-
> - There (currently) is no user mapping feature, hence item level permissions are not copied over from the on-premises publishing page to the SharePoint Online modern page
211
205
> - This approach can also be used for page transformation across tenants (whenever that would make sense)
212
206
213
-
### I want to use the logging features (as of April 2019 release, version 1.0.1904.*)
207
+
### I want to use the logging features
214
208
215
209
By default there are three possible log observers (Console, Markdown and MarkdownToSharePoint). The latter two create an MD based report and put them on disk or in SharePoint as a modern page, whereas the first one simply outputs console messages. Below sample shows how you can use the loggers from .NET:
using (varcc=am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userName, GetSecureString("Password")))
214
+
AuthenticationManageram=newAuthenticationManager("<Azure AD client id>", "[email protected]", "Pwd as SecureString");
215
+
using (varcc=am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl))
223
216
{
224
217
using (varccTarget=cc.Clone(targetSiteUrl))
225
218
{
@@ -255,59 +248,19 @@ using (var cc = am.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userNa
255
248
}
256
249
```
257
250
258
-
### I choose the "AddPageAcceptBanner" option but don't see the banner web part on the created pages
259
-
260
-
In order to make the banner webpart work there are 2 requirements that have to be met:
261
-
262
-
- The banner web part must have been installed in your tenant app catalog
263
-
- The banner web part must have been referenced in the used webpartmapping.xml file
264
-
265
-
#### Installing the banner web part
266
-
267
-
To install the default banner web part follow these steps:
268
-
269
-
- Open your tenant app catalog site collection and go to the **Apps for SharePoint** list
270
-
- Download the banner web part solution (**sharepointpnp-pagetransformation-client.sppkg**) from the [sp-dev-modernization](https://github.com/SharePoint/sp-dev-modernization/blob/master/Solutions/PageTransformationUI/assets/sharepointpnp-pagetransformation-client.sppkg?raw=true) repository
271
-
- Drag and drop the sppkg file in the **Apps for SharePoint** list. Doing so will ask to **make this solution available to all sites in your organization**. Check the box and click on **Deploy**.
272
-
273
-
> [!NOTE]
274
-
> The page banner web part is configured to **not** be visible in the web part picker...so even if you've deployed it to all sites in your tenant it will still not be visible for your users. It can only programmatically be added to a page
275
-
276
-
#### Checking your webpartmapping.xml file
277
-
278
-
When the page transformation engine puts the banner web part on a page it gets it's definition from the webpartmapping.xml file. Check if you find a web part of type **SharePointPnP.Modernization.PageAcceptanceBanner** in your mapping file. Below sample shows the default configuration using the default web part uploaded in the previous step.
> - The default mapping file already contains the correct configuration
296
-
> - You can use your own custom banner web part by simply deploying it and then updating the mapping in the used webpartmapping.xml file.
297
-
298
251
### Modern site pages don't work on the site I want to transform pages in
299
252
300
253
By default the modern site page capability is enabled on most sites but maybe it was turned off afterwards. If that's the case the [SharePoint Modernization scanner](https://aka.ms/sppnp-modernizationscanner) will tell you which sites have turned of the modern page feature. To remediate this use below sample PnP PowerShell script:
0 commit comments