编写webpart时默认组和默认名称的设置
转帖:WSS 3.0 Web Part Gallery Groups
发布webpart的模块定义文件,其中[WebPart Name]替换为默认的名称,[Group Name]替换为默认的组
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="WebParts" List="113" Url="_catalogs/wp" >
<File Url="[WebPart Name].webpart" Type="GhostableInLibrary" >
<Property Name="Group" Value="[Group Name]"/>
</File>
</Module>
</Elements>
.webpart文件中定义:
<?xml version="1.0" encoding="utf-8"?>
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="5c1cdc0b-4705-4a84-b57e-5e757acc28dc"/>
<importErrorMessage>导入显示文章摘要控件出错.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="Title" type="string">摘要,显示在选择webprart框中,webpart的名称</property>
<property name="Description" type="string">显示文章摘要</property>
</properties>
</data>
</webPart>
</webParts>