sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

webpartmapping.xml WebPart Type name for custom Webparts

Open reliktus opened this issue 8 years ago • 4 comments

[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="&#123;&quot;serverProcessedContent&quot;&#58;&#123;&quot;htmlStrings&quot;&#58;&#123;&#125;,&quot;searchablePlainTexts&quot;&#58;&#123;&#125;,&quot;imageSources&quot;&#58;&#123;&#125;,&quot;links&quot;&#58;&#123;&#125;&#125;,&quot;dataVersion&quot;&#58;&quot;1.0&quot;,&quot;properties&quot;&#58;&#123;&quot;script&quot;&#58;&quot;{Script}&quot;,&quot;title&quot;&#58;&quot;{Title}&quot;,&quot;removePadding&quot;&#58;false,&quot;spPageContextInfo&quot;&#58;false&#125;&#125;"/> </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.

reliktus avatar Oct 15 '18 13:10 reliktus

The type will be the full identifier namespace, such as yournamespace.MyCustomWebpart

Seiyasu avatar Oct 16 '18 02:10 Seiyasu

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 .

reliktus avatar Oct 16 '18 07:10 reliktus

Just an the docs pointed, the full identifier namespace is your own definition.

Seiyasu avatar Oct 29 '18 06:10 Seiyasu

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

msft-github-bot avatar Jan 26 '20 06:01 msft-github-bot