Skip to content

Commit 388afa3

Browse files
committed
updates
1 parent 8c0cc26 commit 388afa3

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

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

Lines changed: 20 additions & 9 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: 09/03/2019
4+
ms.date: 09/04/2019
55
ms.prod: sharepoint
66
localization_priority: Normal
77
---
@@ -365,7 +365,24 @@ Promoting pages created from a page layout as news pages can be be done by addin
365365
</MetaData>
366366
```
367367

368-
### Can I control the page preview image
368+
### I want to insert hard coded text on the created page (as of September 2019 release)
369+
370+
Sometimes a page layout contains text snippets, which since they're not content in the actual page are not getting transformed. If that's the case then you can define a "fake" field to map like shown below:
371+
372+
```XML
373+
<WebParts>
374+
...
375+
<Field Name="ID" TargetWebPart="SharePointPnP.Modernization.WikiTextPart" Row="1" Column="3">
376+
<Property Name="Text" Type="string" Functions="StaticString('&lt;H1&gt;This is some extra text&lt;/H1&gt;')" />
377+
</Field>
378+
...
379+
</WebParts>
380+
```
381+
382+
> [!Note]
383+
> 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
384+
385+
### Can I control the page preview image (as of the May 2019 release)
369386

370387
When a page has a page header image that image will also be used as a page preview image. If you however want to control the page preview image then you can populate the `BannerImageUrl` field using either the `ToPreviewImageUrl` function or by specifying a hard coded value as shown in below samples.
371388

@@ -380,10 +397,7 @@ When a page has a page header image that image will also be used as a page previ
380397
<Field Name="PreviewImage" TargetFieldName="BannerImageUrl" Functions="ToPreviewImageUrl('/sites/classicportal/images/myimage.jpg')" />
381398
```
382399

383-
> [!Note]
384-
> Controlling the page preview image was introduced with the May 2019 release.
385-
386-
### I want to use different defaults for the QuickLinks web part
400+
### I want to use different defaults for the QuickLinks web part (as of the July 2019 release)
387401

388402
When transformation results in a modern QuickLinks web part (e.g. for transformation of the SummaryLinkWebPart) then the page transformation framework will use a default base configuration for the QuickLinks web part. If you, however, want a different configuration then you can do that by specifying the QuickLinksJsonProperties property. Wrap the encoded JSON properties in a StaticString function as shown in this sample:
389403

@@ -401,6 +415,3 @@ When transformation results in a modern QuickLinks web part (e.g. for transforma
401415
```
402416

403417
The JSON in the sample shows all the possible configuration options you can set, but you can however also just define the ones you need. As long as the JSON is valid and the structure is maintained your custom QuickLinks configuration will be picked up.
404-
405-
> [!Note]
406-
> - The QuickLinks defaults override option was introduced in the July 2019 release

0 commit comments

Comments
 (0)