webpartmapping.xml WebPart Type name for custom Webparts
[Enter feedback here]
Hi,
what is the full "Type" for custom made webpart?
Sample looks like this:
<!-- Html form web part -->
<WebPart Type="Microsoft.SharePoint.WebPartPages.SimpleFormWebPart, Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<Properties>
<Property Name="IsIncluded" Type="bool"/>
<Property Name="Dir" Type="string"/>
<Property Name="PartImageSmall" Type="string"/>
<Property Name="PartImageLarge" Type="string"/>
<Property Name="IsIncludedFilter" Type="bool"/>
<Property Name="Content" Type="string" Functions="{Script} = HtmlEncodeForJson({Content})"/>
</Properties>
<Mappings>
<Mapping Name="PuzzlePartScriptEditor" Default="true">
<ClientSideWebPart Type="Custom" ControlId="3a328f0a-99c4-4b28-95ab-fe0847f657a3" Order="10" JsonControlData="{"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{},"imageSources":{},"links":{}},"dataVersion":"1.0","properties":{"script":"{Script}","title":"{Title}","removePadding":false,"spPageContextInfo":false}}"/>
</Mapping>
</Mappings>
</WebPart>
<!-- InfoPath web part -->
<WebPart Type="Microsoft.Office.InfoPath.Server.Controls.WebUI.BrowserFormWebPart, Microsoft.Office.InfoPath.Server, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<!-- Still to investigate: why don't I see the needed properties? -->
<Mappings>
<!-- TODO: dropping for now, possible alternative is adding a link to the form library assuming we can get that information from the web part -->
<Mapping Default="true" Name="default"></Mapping>
</Mappings>
</WebPart>
For example my webpart is named : MyCustomWebpart and how can We check full Type i need to provide ( any prefixes ?) so the modernization script will reckognize it ?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 5bd60664-6ff4-d92d-4fba-765e9acff51c
- Version Independent ID: 86329fa3-4cb5-0b96-0de9-0aea221a551e
- Content: Understanding and configuring the page transformation model
- Content Source: docs/transform/modernize-userinterface-site-pages-model.md
- Product: sharepoint
- GitHub Login: @spdevdocs
- Microsoft Alias: spdevdocs
The type will be the full identifier namespace, such as yournamespace.MyCustomWebpart
Thank You for Your reply.
Still dont know where to find the full identifier namespace. Maybe You can provide me the "in life" example or where to find it?
After that I Was trying to check if i targeted the webpart correctly: What would be the best practise to check if the custom webpart was targeted correctly without wondering if properties where mapped ? - will the code below 'do the job' by adding text placeholder text in modernized version of page, in place of CustomClassicCalendarWebPart webpart will be found ?
<WebPart Type="Microsoft.SharePoint.WebPartPages.CustomClassicCalendarWebPart, Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=***"
Z poważaniem / Best regards, Rafał Jaworski
wt., 16 paź 2018 o 04:19 Seiya Su [email protected] napisał(a):
The type will be the full identifier namespace, such as yournamespace.MyCustomWebpart
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SharePoint/sp-dev-docs/issues/2768#issuecomment-430077437, or mute the thread https://github.com/notifications/unsubscribe-auth/AYicVp3pTEaLx8FSpevGbTDyPQJE5yPmks5ulUJDgaJpZM4XcYlS .
Just an the docs pointed, the full identifier namespace is your own definition.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues