CJ

The circle of life – ** .Net – Training – MOSS **

  • Past Post

  • Vistor Locations

How to add a webpart into a special group other than miscellaneous

Posted by Clayton James on January 8, 2009

By default, SharePoint web parts are always put into a web part group called “Miscellaneous”.

If you want to automate this process when deploying your web parts as a Feature you can do the following:

In your web parts element manifest file

<ElementManifests>
    <ElementManifest Location=”MyWebPart\MyWebPart.xml” /> this is the file you edit
    <ElementFile Location=”MyWebPart\MyWebPart.webpart” />
  </ElementManifests>

 

Add the following elements

<Module Name=”WebParts” List=”113″ Url=”_catalogs/wp”>
      <File Path=”FlarePoint.MyWebPart.webpart” Url=”FlarePoint.MyWebPart.webpart” Type=”GhostableInLibrary”>
          <Property Name=”Group” Value=”FlarePoint Web Parts” />this is what you add for the Group
          <Property Name=”Title” Value=”FlarePoint.MyWebPart” />this is what you add for the Title
          <Property Name=”WebPartDescription” Value=”FlarePoints MyWebPart description” />this is what you add for the Description
      </File>
  </Module>

Good post on doing this via the object model
http://blogs.msdn.com/cliffgreen/archive/2008/04/18/adding-web-parts-to-the-web-part-gallery-using-the-sharepoint-object-model.aspx

Advertisements

12 Responses to “How to add a webpart into a special group other than miscellaneous”

  1. ramneek said

    Hi CJ,

    I cant get it to work. I am using smarttemplate(http://www.codeplex.com/smarttemplates) to build and deploy my webparts. The webpart is still appearing under miscellaneous category even after doing this change.

    please let me know what change i have to do for it.

    Thanks
    Ramneek

    • boriska said

      Hi Ramneek,
      the property “Group” is visible onto webparts gallery page (/_catalogs/wp/Forms/AllItems.aspx), anyway, you should also add <Property Name="QuickAddGroups" Value="mySmartTemplates” /> if you want to see your webpart from a custom group in your dialog webpage “Add a webpart”…
      and don’t forget to check if your very last modifications have been taken into account…

  2. Biju said

    Hi,
    I have developed an event handler,called TaskListEventHandler, for the Task list ((ItemAdding, ItemDeleting, ItemUpdating) as feasture using the WSP Builder project template, and I have also added a web part, called RegisterEventHandler, which could be used to bind(register) the events to a list. The webpart is WSP Builder template “Webpart without feature”.

    Currently, on deployment, my feature and the webpart is getting deployed sucessfully. The web part is available in the web part gallery (SiteSetting->EditPage–> Add a webpart).

    Now i need to make the web part available in a particular category/group in the gallery using the WSP Builder?
    I tried setting the group in the RegisterEventHandler.webpart file (which is automatically created by WSP builder on adding the webpart template inot the project), but still it doesn’t show up 😦

    Cannot import RegisterEventHandler Web Part.

    RegisterEventHandler
    This webpart is used to register or unregister the event handler to the task list – By Biju (09 Sep 2009)
    Biju Webparts

    Could anyone please help or suggest me some solution or sample code?With regardsBiju

  3. Biju said

    my .webpart file has the following contenet

    Cannot import RegisterEventHandler Web Part.

    RegisterEventHandler
    This webpart is used to register or unregister the event handler to the task list – By Biju (09 Sep 2009)
    Biju Webparts

  4. Biju said

    Cannot import RegisterEventHandler Web Part.

    RegisterEventHandler
    This webpart is used to register or unregister the event handler to the task list – By Biju (09 Sep 2009)
    Biju Webparts

  5. ArrgHunter said

    CJ you are great.

    i spend almost a week trying to figure out how to add group in WSS3.0 web part gallery.
    i must say that all post were written in around 2007 and every one was saying add group property into elements.xml or Menifestelements.xml, even all the articles from microsoft talking about those two files.

    thanks, i have followed your instructions and it worked like a charm.

    reagrds,

  6. Amr Shimi said

    Its pretty easy, Goto Site Setting, then click on “Web Parts” Under Galleries Then Chose Upload Document, Then Press Browse and upload your xxx.dwp After that you will find Group or “Specify your own value:” if you didn’t already created a group, now you will be able to see the webpart you uploaded in your New Category/Group 🙂

    Note: That Instruction Using Microsoft SharePoint, Version=12.0.0.0/ 2007

    Good-luck.
    Amr

  7. Meizitang Strong Version…

    […]How to add a webpart into a special group other than miscellaneous « CJ[…]…

  8. ani bg said

    ani bg…

    […]How to add a webpart into a special group other than miscellaneous « CJ[…]…

  9. Hey I am so grateful I found your website, I really found
    you by accident, while I was searching on Bing for something else, Regardless I
    am here now and would just like to say cheers for a marvelous post and a all round enjoyable blog (I also love the theme/design), I
    don’t have time to look over it all at the moment but I
    have saved it and also added in your RSS feeds, so when I have time I
    will be back to read more, Please do keep up the superb work.

  10. google said

    Spot on with this write-up, I honestly believe that this amazing site needs much more attention. I’ll probably be back again to see
    more, thanks for the advice!

  11. Hiya very nice bloɡ!! Man .. Excellent ..
    Superb .. I wiⅼl bookmark your blog and take
    the feeds additionally? Ι’m happy to seeк out a lot of useful information here
    within the publish, we’d like develop morе techniques in this regard, thanks
    for sharing. . . . . .

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: