Skip to content

Commit 58b099f

Browse files
committed
Doc updates for the upcoming February 2020 release
1 parent c3d3229 commit 58b099f

File tree

4 files changed

+207
-44
lines changed

4 files changed

+207
-44
lines changed

docs/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,6 +1400,8 @@
14001400
href: transform/modernize-userinterface-site-pages-configuration.md
14011401
- name: Classic web part to modern mapping
14021402
href: transform/modernize-userinterface-site-pages-webparts.md
1403+
- name: In-place versus cross-site page transformation
1404+
href: transform/modernize-userinterface-site-pages-approach.md
14031405
- name: Page transformation security
14041406
href: transform/modernize-userinterface-site-pages-security.md
14051407
- name: Page transformation model

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

Lines changed: 116 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Page Transformation Functions and Selectors
33
description: Page Transformation Functions and Selectors
4-
ms.date: 12/13/2019
4+
ms.date: 02/06/2020
55
ms.prod: sharepoint
66
localization_priority: Normal
77
---
@@ -117,6 +117,40 @@ Name|Description
117117
{String2}|Second string
118118
#### Output parameters
119119

120+
Name|Description
121+
:-----|:----------
122+
{CompleteString}|Concatenation of the passed strings
123+
### ConcatenateWithSemiColonDelimiter
124+
125+
**Description:** Concatenates 2 strings with a semicolon in between.
126+
127+
**Example:** `{CompleteString} = ConcatenateWithSemiColonDelimiter({String1},{String2})`
128+
129+
#### Input parameters
130+
131+
Name|Description
132+
:-----|:----------
133+
{String1}|First string
134+
{String2}|Second string
135+
#### Output parameters
136+
137+
Name|Description
138+
:-----|:----------
139+
{CompleteString}|Concatenation of the passed strings
140+
### ConcatenateWithPipeDelimiter
141+
142+
**Description:** Concatenates 2 strings with a pipe character in between.
143+
144+
**Example:** `{CompleteString} = ConcatenateWithSemiColonDelimiter({String1},{String2})`
145+
146+
#### Input parameters
147+
148+
Name|Description
149+
:-----|:----------
150+
{String1}|First string
151+
{String2}|Second string
152+
#### Output parameters
153+
120154
Name|Description
121155
:-----|:----------
122156
{CompleteString}|Concatenation of the passed strings
@@ -138,7 +172,7 @@ Name|Description
138172
{return value}|String provided as input
139173
### TextCleanup
140174

141-
**Description:** Rewrites wiki page html to be compliant with the html supported by the modern text part.
175+
**Description:** Rewrites wiki page html to be compliant with the html supported by the client side text part.
142176

143177
**Example:** `{CleanedText} = TextCleanup({Text},{UsePlaceHolders})`
144178

@@ -152,7 +186,7 @@ Name|Description
152186

153187
Name|Description
154188
:-----|:----------
155-
{CleanedText}|Html compliant with modern text part
189+
{CleanedText}|Html compliant with client side text part
156190
### ContainsScript
157191

158192
**Description:** Checks if the provided html contains JavaScript
@@ -303,20 +337,20 @@ Name|Description
303337
{Anchor}|The url after url rewrite. If the anchor and original image url were the same then the anchor will be set to the new image url
304338
### ExtractWebpartProperties
305339

306-
**Description:** Extracts the modern web part properties so they can be reused.
340+
**Description:** Extracts the client side web part properties so they can be reused.
307341

308342
**Example:** `{JsonProperties} = ExtractWebpartProperties({ClientSideWebPartData})`
309343

310344
#### Input parameters
311345

312346
Name|Description
313347
:-----|:----------
314-
{ClientSideWebPartData}|Web part data defining the modern web part configuration
348+
{ClientSideWebPartData}|Web part data defining the client side web part configuration
315349
#### Output parameters
316350

317351
Name|Description
318352
:-----|:----------
319-
{JsonProperties}|Json properties to configure the modern web part
353+
{JsonProperties}|Json properties to configure the client side web part
320354
### DocumentEmbedLookup
321355

322356
**Description:** Does lookup a file based on the given server relative path and return needed properties of the file. Returns null if file was not found.
@@ -447,7 +481,7 @@ Name|Description
447481
{ImageSources}|ImageSources nodes to be added in the serverProcessedContent node
448482
### TextCleanUpSummaryLinks
449483

450-
**Description:** Rewrites summarylinks web part html to be compliant with the html supported by the modern modern text part.
484+
**Description:** Rewrites summarylinks web part html to be compliant with the html supported by the client side text part.
451485

452486
**Example:** `{CleanedText} = TextCleanUpSummaryLinks({Text})`
453487

@@ -460,7 +494,7 @@ Name|Description
460494

461495
Name|Description
462496
:-----|:----------
463-
{CleanedText}|Html compliant with modern text part
497+
{CleanedText}|Html compliant with client side text part
464498
### SummaryLinksToQuickLinksProperties
465499

466500
**Description:** Maps summarylinks web part data into a properties collection and supporting serverProcessedContent nodes for the quicklinks web part
@@ -530,6 +564,61 @@ Name|Description
530564
Name|Description
531565
:-----|:----------
532566
{return value}|String provided as input
567+
### Prefix
568+
569+
**Description:** Prefixes the input text with another text. The applyIfContentIsEmpty parameter controls if the prefix also needs to happen when the actual content is empty
570+
571+
**Example:** `Prefix('<H1>Prefix some extra text</H1>', {PublishingPageContent}, 'false')`
572+
573+
#### Input parameters
574+
575+
Name|Description
576+
:-----|:----------
577+
{'prefix string'}|Static input string which will be used as prefix
578+
{PublishingPageContent}|The actual publishing page HTML field content to prefix
579+
{'static boolean value'}|Static bool ('true', 'false') to indicate if the prefixing still needs to happen when the {PublishingPageContent} field content is emty
580+
#### Output parameters
581+
582+
Name|Description
583+
:-----|:----------
584+
{return value}|Value of {PublishingPageContent} prefixed with the provided prefix value
585+
### Suffix
586+
587+
**Description:** Suffixes the input text with another text. The applyIfContentIsEmpty parameter controls if the suffix also needs to happen when the actual content is empty
588+
589+
**Example:** `Suffix('<H1>Suffix some extra text</H1>', {PublishingPageContent}, 'false')`
590+
591+
#### Input parameters
592+
593+
Name|Description
594+
:-----|:----------
595+
{'suffix string'}|Static input string which will be used as suffix
596+
{PublishingPageContent}|The actual publishing page HTML field content to suffix
597+
{'static boolean value'}|Static bool ('true', 'false') to indicate if the suffixing still needs to happen when the {PublishingPageContent} field content is emty
598+
#### Output parameters
599+
600+
Name|Description
601+
:-----|:----------
602+
{return value}|Value of {PublishingPageContent} suffixed with the provided suffix value
603+
### PrefixAndSuffix
604+
605+
**Description:** Prefixes and suffixes the input text with another text. The applyIfContentIsEmpty parameter controls if the prefix/suffix also needs to happen when the actual content is empty
606+
607+
**Example:** `PrefixAndSuffix('<H1>Prefix some extra text</H1>','<H1>Suffix some extra text</H1>',{PublishingPageContent},'false')`
608+
609+
#### Input parameters
610+
611+
Name|Description
612+
:-----|:----------
613+
{'prefix string'}|Static input string which will be used as prefix
614+
{'suffix string'}|Static input string which will be used as suffix
615+
{PublishingPageContent}|The actual publishing page HTML field content to prefix/suffix
616+
{'static boolean value'}|Static bool ('true', 'false') to indicate if the prefixing/suffixing still needs to happen when the {PublishingPageContent} field content is emty
617+
#### Output parameters
618+
619+
Name|Description
620+
:-----|:----------
621+
{return value}|Value of {PublishingPageContent} prefixed/suffixed with the provided values
533622
### ToImageUrl
534623

535624
**Description:** Returns the server relative image url of a Publishing Image field value.
@@ -626,6 +715,24 @@ Name|Description
626715
Name|Description
627716
:-----|:----------
628717
{return value}|A formatted json blob describing the user's details
718+
### DefaultTaxonomyFieldValue
719+
720+
**Description:** Populate a taxonomy field based upon provided term id's. You can configure to optionally overwrite existing values
721+
722+
**Example:** `DefaultTaxonomyFieldValue({TaxField2},'a65537e8-aa27-4b3a-bad6-f0f61f84b9f7|69524923-a5a0-44d1-b5ec-7f7c6d0ec160','true')`
723+
724+
#### Input parameters
725+
726+
Name|Description
727+
:-----|:----------
728+
{Taxonomy Field}|The taxonomy field to update
729+
{'term ids split by |'}|List of term id's to set, multiple values can also be used when the taxonomy field is configured to accept multiple terms
730+
{'static boolean value'}|Static bool ('true', 'false') to indicate if the default term values have to be set in case the fiels already contains terms
731+
#### Output parameters
732+
733+
Name|Description
734+
:-----|:----------
735+
{return value}|String with term information needed to set the taxonomy field
629736
## Selectors
630737
### TextSelector
631738

@@ -637,7 +744,7 @@ Name|Description
637744

638745
Name|Description
639746
:-----|:----------
640-
{CleanedText}|modern text part compliant html (cleaned via TextCleanup function)
747+
{CleanedText}|Client side text part compliant html (cleaned via TextCleanup function)
641748
#### Output values
642749

643750
Name|Description
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Understanding in-place page transformation versus cross-site page transformation
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
5+
ms.prod: sharepoint
6+
localization_priority: Priority
7+
---
8+
9+
# Understanding in-place page transformation versus cross-site page transformation
10+
11+
When you use page transformation then you can either do an in-place transformation or a cross-site page transformation. Depending on the type of page you're transforming the only option is cross-site page transformation, but there are situations where you choose.
12+
13+
## In-place transformation
14+
15+
During an in-place transformation the created modern pages live in the same site as the original classic page. A typical example of this would be the transformation of the wiki and web part pages in a team site: when you run page transformation you'll end up with new pages (e.g. Migrated_mypage.aspx) next to the classic page (e.g. mypage.aspx) that you migrated. Depending on how you've configured page transformation it might also be the case that the modern page takes the name of the classic page (e.g. mypage.aspx) and the classic page will be renamed (e.g. Previous_mypage.aspx).
16+
17+
Overall in-place transformation will give you the best results as there's no risk of broken dependencies (e.g. File viewer web part showing a file from the site's Documents library) and therefor it's the recommended model for the page types (wiki and web part pages) that can be transformed in-place.
18+
19+
## Cross-site transformation
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.
22+
23+
## In-place transformation versus cross-site transformation
24+
25+
Below table provides an overview on whether you need to use in-place transformation, cross-site transformation or whether you can choose.
26+
27+
Source\Type | Wiki page | Web part page | Publishing page | Blog page | Delve blog page
28+
------------------|-----------|---------------|-----------------|-----------|----------------
29+
SharePoint Online | In-place (preferred) or cross-site | In-place (preferred) or cross-site | Cross-site | Cross-site | Cross-site
30+
SharePoint 2019 | Cross-site | Cross-site | Cross-site | Cross-site | N/A
31+
SharePoint 2016 | Cross-site | Cross-site | Cross-site | Cross-site | N/A
32+
SharePoint 2013 | Cross-site | Cross-site | Cross-site | Cross-site | N/A
33+
SharePoint 2010 | Cross-site | Cross-site | Cross-site | Cross-site | N/A
34+
35+
## Limitations on allowed target sites during a cross-site transformation
36+
37+
When you perform a cross-site page transformation then be aware that not all sites can serve as a target to receive modern pages in a cross-site page transformation flow. Allowed site templates are the following:
38+
39+
- Communication site (SITEPAGEPUBLISHING#0)
40+
- Team site (STS#0 and STS#3)
41+
- Group connected team site (GROUP#0)
42+
- Document center site (BDR#0)
43+
- Development site (DEV#0)

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

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Understanding and configuring the publishing page transformation model
33
description: Provides detailed guidance on how to configure and use the publishing page transformation model
4-
ms.date: 12/13/2019
4+
ms.date: 02/06/2020
55
ms.prod: sharepoint
66
localization_priority: Normal
77
---
@@ -344,45 +344,18 @@ Now that the assembly has been defined you can use your functions and selectors
344344

345345
## Page layout mapping FAQ
346346

347-
### I want to keep the source page creation information (as of September 2019 release)
347+
### I want to keep the source page creation information (as of October 2019 release)
348348

349-
You can do this by altering your page layout mapping like shown in below sample:
349+
When using the [PnP PowerShell approach](modernize-userinterface-site-pages-powershell.md) then use the `-KeepPageCreationModificationInformation` cmdlet in the `ConvertTo-PnPClientSidePage` cmdlet. When you're using the [.Net approach](modernize-userinterface-site-pages-dotnet.md) then set the `KeepPageCreationModificationInformation` parameter to true. Using this option will give the target page the Created, Modified, Author and Editor field values from the source page.
350350

351-
```XML
352-
<MetaData>
353-
...
354-
<!-- Use below 4 fields to retain user created/date created, user modified/date modified will be overwritten afterwards, but you need to include them to make this "override" work -->
355-
<Field Name="Created" TargetFieldName="Created" Functions="" />
356-
<Field Name="Modified" TargetFieldName="Modified" Functions="" />
357-
<Field Name="Author" TargetFieldName="Author" Functions="" />
358-
<Field Name="Editor" TargetFieldName="Editor" Functions="" />
359-
...
360-
</MetaData>
361-
```
362-
363-
On publishing this page the modification data will change again. If you want to keep the modification date shown correctly in the modern page header you should set this field as well:
364-
365-
```XML
366-
<MetaData>
367-
...
368-
<Field Name="Modified" TargetFieldName="FirstPublishedDate" Functions=""/>
369-
...
370-
</MetaData>
371-
```
372-
373-
In above sample the page modification date is taken as FirstPublishedDate, but you can also take other DateTime fields like ArticleStartDate.
351+
> [!Note]
352+
> When you, as part of page transformation, promote the page as news or publish the page the Editor field will be set to the account running page transformation
374353
375-
### I want to promote the created pages as news
354+
### I want to promote the created pages as news (as of October 2019 release)
376355

377-
Promoting pages created from a page layout as news pages can be be done by adding the below fields to your page layout mapping:
356+
Promoting pages created from a page layout as news pages can be be done by using the `-PostAsNews` parameter on the `-KeepPageCreationModificationInformation` cmdlet (when you're using the [PnP PowerShell approach](modernize-userinterface-site-pages-powershell.md)) or alternatively by setting the `PostAsNews` parameter to true (when using the [.Net approach](modernize-userinterface-site-pages-dotnet.md)).
378357

379-
```XML
380-
<MetaData>
381-
...
382-
<Field Name="ID" TargetFieldName="PromotedState" Functions="StaticString('2')" />
383-
...
384-
</MetaData>
385-
```
358+
When you use the `PostAsNews` option in conjunction with the `KeepPageCreationModificationInformation` option then `FirstPublishedDateField` field will be set to the source page modification date. The `FirstPublishedDateField` field is the date value shown during news rollup.
386359

387360
### I want to insert hard coded text on the created page (as of September 2019 release)
388361

@@ -401,6 +374,44 @@ Sometimes a page layout contains text snippets, which since they're not content
401374
> [!Note]
402375
> The HTML provided in the StaticString function must be XML encoded and must be formatted like the source page HTML as this HTML will still be converted to HTML which is compliant with the modern text editor
403376
377+
### I want to prefix or suffix the content from field (as of February 2020 release)
378+
379+
The approach used in the previous chapter allows you to add extra text on a page, but has as downside that the extra text will be added in it's own text part. If you want the extra text to be integrated with the actual text being transformed then the below approach allows you to do that. You can either prefix and/or suffix existing field content and optionally you can only have the prefixing/suffixing done when the the field contains content. The bool parameter in the `Prefix`, `Suffix` and `PrefixAndSuffix` functions defines whether the prefixing/suffixing needs to happen when the field content is empty: 'true' means to apply the action even when the field is empty.
380+
381+
See [Page Transformation Functions and Selectors](modernize-userinterface-site-pages-api.md) for more details on the below functions.
382+
383+
```Xml
384+
<WebParts>
385+
...
386+
<Field Name="PublishingPageContent" TargetWebPart="SharePointPnP.Modernization.WikiTextPart" Row="1" Column="2">
387+
<Property Name="Text" Type="string" Functions="PrefixAndSuffix('&lt;H1&gt;Prefix some extra text&lt;/H1&gt;','&lt;H1&gt;Suffix some extra text&lt;/H1&gt;',{PublishingPageContent},'false')" />
388+
</Field>
389+
...
390+
<Field Name="PublishingPageContent" TargetWebPart="SharePointPnP.Modernization.WikiTextPart" Row="1" Column="2">
391+
<Property Name="Text" Type="string" Functions="Prefix('&lt;H1&gt;Prefix some extra text&lt;/H1&gt;',{PublishingPageContent},'true')" />
392+
</Field>
393+
...
394+
<Field Name="PublishingPageContent" TargetWebPart="SharePointPnP.Modernization.WikiTextPart" Row="1" Column="2">
395+
<Property Name="Text" Type="string" Functions="Suffix('&lt;H1&gt;Suffix some extra text&lt;/H1&gt;',{PublishingPageContent},'false')" />
396+
</Field>
397+
...
398+
</WebParts>
399+
```
400+
401+
### I want to populate a managed metadata field with one or more terms
402+
403+
When you have a managed metadata field in the source page metadata then you might want to have a similar managed metadata field for the target page. Given page transformation currently does have a managed metadata mapping feature this poses a problem. A possible workaround is to populate the target managed metadata field with a chosen term or a set of terms in case of a multi-value managed metadata field. This can be done using the `DefaultTaxonomyFieldValue` function as shown in below example:
404+
405+
```Xml
406+
<MetaData ShowPageProperties="true" PagePropertiesRow="1" PagePropertiesColumn="4" PagePropertiesOrder="1">
407+
...
408+
<Field Name="TaxField2" TargetFieldName="Metadata2" Functions="DefaultTaxonomyFieldValue({TaxField2},'a65537e8-aa27-4b3a-bad6-f0f61f84b9f7|69524923-a5a0-44d1-b5ec-7f7c6d0ec160','true')" ShowInPageProperties="true"/>
409+
...
410+
</MetaData>
411+
```
412+
413+
See [Page Transformation Functions and Selectors](modernize-userinterface-site-pages-api.md) for more details on the `DefaultTaxonomyFieldValue` function.
414+
404415
### I want to add an extra web part on the created page
405416

406417
When you transform you classic publishing page to a modern page you sometimes want to add an **additional** modern web part on the created page, without that there's a classic version of that web part on the classic publishing page. This can be done by adjusting your webpartmapping.xml and page layout mapping files as shown below.

0 commit comments

Comments
 (0)