SPC046401: Declare property 'Title' and 'Description' in WebPart

A WebPart should contain the attribute title and description to provide meaningfull information to the end user which would add the web part to a page.

TypeName: DeclareTitleAndDescriptionInWebPart
CheckId: SPC046401
Severity: CriticalWarning
Type: WebPartFile
Resolution

The Webpart should have property title and description in the .webpart file. See sample below:

<webParts>
   <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
      <metaData>
         <type name="TypeName, Version=VersionNumber, Culture=neutral, PublicKeyToken=PublicKeyToken" />  
         <importErrorMessage>Cannot import this Web Part.</importErrorMessage>  
      </metaData>
      <data>
         <properties>
            <property name="Title" type="string">WebPartTitle</property>
            <property name="Description" type="string">WebPartDescription</property>
            ...
         </properties>
      </data>
   </webPart>
</webParts>

Links

comments powered by Disqus