MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

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

Viewed 11531 time(s), 3 post(s) 10/19/2011 4:31:37 PMby shawndg
shawndg

shawndg

10/19/2011 4:31:37 PM
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);
This content has not been rated yet. 
1871 Reputation 252 Total posts
shawndg

shawndg

10/19/2011 4:44:40 PM
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..
This content has not been rated yet. 
1871 Reputation 252 Total posts
khorvat

khorvat

10/20/2011 6:50:38 AM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts