Mono Support Web Parts 4.5 - Setting Descriptions and Categories on Inherited Web Parts 

Viewed 12931 time(s), 3 post(s), 10/19/2011 4:31:37 PM - by shawndg
10/19/2011 4:31:37 PM
1871 Reputation 252 Total posts

Hello,

Problems trying to figure out how to set the category and web part title on a inherited MonoX webpart to my own.

I looked at the example, but that seems to be just setting it using the Base Part and not another web part.

I tried setting it in innit but no luck..

protected override void OnInit(EventArgs e)
{

this.CatalogCategory = "CustomExt";
this.Title = "Event Module - Ascending";

base.OnInit(e);

1
10/19/2011 4:44:40 PM
1871 Reputation 252 Total posts

Ok I figured out how to get it to go into a category..

Add..
using MonoSoftware.MonoX;

and then above the class that inherits...
[WebPartCatalogCategory("CustomExt")]

example:
[WebPartCatalogCategory("CustomExt")]
public partial class EventModuleExt : MonoSoftware.MonoX.ModuleGallery.EventModule

still working on description..

2
10/20/2011 6:50:38 AM
15993 Reputation 2214 Total posts

Hi,

Yes WebPartCatalogCategory should be added to the WebPart to get the proper category and  you should put a description in the WebPart Constructor.

Let me know if this works for you.

Regards

3
This is a demo site for MonoX. Please visit Mono Software for more info.