Skip to content

Commit d0657c6

Browse files
committed
quicklinks configuration options
1 parent 8e65358 commit d0657c6

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

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

Lines changed: 40 additions & 2 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: 06/06/2019
4+
ms.date: 06/24/2019
55
ms.prod: sharepoint
66
localization_priority: Normal
77
---
@@ -102,7 +102,14 @@ Let's analyze how a page layout mapping is configured in the page layout mapping
102102
</Field>
103103
</WebParts>
104104
<WebPartZones>
105-
<WebPartZone Row="2" Column="1" Order="1" ZoneId="g_0C7F16935FAC4709915E2D77092A90DE" ZoneIndex="0"/>
105+
<WebPartZone Row="2" Column="1" Order="1" ZoneId="g_0C7F16935FAC4709915E2D77092A90DE" ZoneIndex="0">
106+
<!-- Optional element, only needed if you want to use custom position of the web parts coming from a web part zone -->
107+
<WebPartZoneLayout>
108+
<WebPartOccurrence Type="Microsoft.SharePoint.WebPartPages.ContentEditorWebPart, Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Row="3" Column="2"/>
109+
<WebPartOccurrence Type="Microsoft.SharePoint.WebPartPages.ContentEditorWebPart, Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Row="3" Column="1" Order="2"/>
110+
<WebPartOccurrence Type="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Row="3" Column="1" Order="1"/>
111+
</WebPartZoneLayout>
112+
</WebPartZone>
106113
</WebPartZones>
107114
<FixedWebParts>
108115
<WebPart Row="1" Column="2" Order="1" Type="Microsoft.SharePoint.WebPartPages.ContentEditorWebPart, Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
@@ -204,6 +211,18 @@ If the page layout contains web part zones then these must be defined here. This
204211
- **Column**: the column you want to put the web parts hosted in this zone in. Needs to be 1, 2 or 3.
205212
- **Order**: order in the defined row/column for the web parts hosted in this zone
206213

214+
Sometimes publishing pages have multiple web parts in a web part zone and you do want to position each web part differently on the target page. You can do that by using the optional WebPartZoneLayout element:
215+
216+
```Xml
217+
<WebPartZoneLayout>
218+
<WebPartOccurrence Type="Microsoft.SharePoint.WebPartPages.ContentEditorWebPart, Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Row="3" Column="2"/>
219+
<WebPartOccurrence Type="Microsoft.SharePoint.WebPartPages.ContentEditorWebPart, Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Row="3" Column="1" Order="2"/>
220+
<WebPartOccurrence Type="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Row="3" Column="1" Order="1"/>
221+
</WebPartZoneLayout>
222+
```
223+
224+
The above definition will have as a result that the first ContentEditorWebPart will go to row 3, column 2. The second ContentEditorWebPart will be put in row 3, column 1 with order 2 and the first XSLTListView web part will end up in row 3, column 1 with order 1. You can define as many WebPartOccurrence elements as needed, if there is no corresponding web part in the web part zone then the WebPartOccurrence element will be ignored. If there's a web part in the web part zone which is not listed as a WebPartOccurrence element then that web part will get it's row, column and order information from the WebPartZone element.
225+
207226
### FixedWebParts element
208227

209228
Sometimes page layouts contain "fixed" web parts, this are web parts which are hard coded inside the page layout and therefore these are present on all pages that use the page layout. As there's no API's to detect these "fixed" web parts they need to be defined as part of the page layout mapping model.
@@ -344,3 +363,22 @@ When a page has a page header image that image will also be used as a page previ
344363

345364
> [!Note]
346365
> Controlling the page preview image was introduced with the May 2019 release.
366+
367+
### I want to use different defaults for the QuickLinks web part
368+
369+
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:
370+
371+
```XML
372+
<WebParts>
373+
...
374+
<Field Name="SummaryLinks" TargetWebPart="Microsoft.SharePoint.Publishing.WebControls.SummaryLinkWebPart, Microsoft.SharePoint.Publishing, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Row="1" Column="2">
375+
<!-- No function specified, means the content of the PublishingPageContent field will be assigned to the value of the first listed web part property -->
376+
<Property Name="SummaryLinkStore" Type="string" />
377+
<Property Name="Title" Type="string" Functions="EmptyString()"/>
378+
<Property Name="QuickLinksJsonProperties" Type="string" Functions="StaticString('{&quot;isMigrated&quot;: false, &quot;layoutId&quot;: &quot;Button&quot;, &quot;shouldShowThumbnail&quot;: true, &quot;buttonLayoutOptions&quot;: { &quot;showDescription&quot;: false, &quot;buttonTreatment&quot;: 1, &quot;iconPositionType&quot;: 2, &quot;textAlignmentVertical&quot;: 1, &quot;textAlignmentHorizontal&quot;: 2, &quot;linesOfText&quot;: 2}, &quot;listLayoutOptions&quot;: { &quot;showDescription&quot;: false, &quot;showIcon&quot;: true}, &quot;waffleLayoutOptions&quot;: { &quot;iconSize&quot;: 1, &quot;onlyShowThumbnail&quot;: false}, &quot;hideWebPartWhenEmpty&quot;: true}')" />
379+
</Field>
380+
...
381+
</WebParts>
382+
```
383+
384+
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.

0 commit comments

Comments
 (0)