Sunday, November 8, 2009

Displaying webparts under custom group

Scenario:
We had whole bunch of webparts developed and wanted to locate them easily in Add a Webpart dialogue , so wanted to display them in their own custom group name.

Solution:
While uploading web parts using Module tag, you can also specify group name like this.

wp group

Code:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
<Module Name="WebParts" List="113" Url="_catalogs/wp">
<File Path="WebPart1.webpart" Url="WebPart1.webpart" Type="GhostableInLibrary" >
<Property Name="Group" Value="Bogus" />
</File>
</Module>
</Elements>

0 comments: