Can't select custom web part as a widget

bert limerkens asked on May 23, 2017 15:28

Hey guys,

I'm having an issue here. I want to create a widget from a custom web part I created. (It inherits from Web Part Zone).

But when I try to select the web part in the widgets application It is not showing. So I can't select it.

Anyone else had this before? Anyone knows what the problem is here?

Thanks for your help!

Kind Regards,

Bert

Correct Answer

Trevor Fayas answered on May 23, 2017 15:55

I believe the issue is that you cannot make a widget from a webpart that INHERITS another webpart.

It's a rather annoying thing i know, i have run into it many a time (it's why you have to clone my Transformable Webpart instead of just inheriting from the base). You actually need to create a non-inheriting web part if you want to turn it into a widget.

Easy way is to just clone the web part (but not the file), and just hve 2 webparts pointing to the same file.

Unless your custom web part does indeed have it's own file, then just manually add all the inherited fields.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Prashant Verma answered on May 23, 2017 15:43 (last edited on May 23, 2017 15:45)

Hi Bert,

You need to register that custom webpart as widget.

Step1 : Go to widget module in kentico admin and create new widget choose your custom webpart on widget based on webpart field and create it.

Step 2 : Then assign it to your current site and use it on page you want to use widget.

Note: If changing anything in your webpart then don't forget to remove and re -add your widget to the page.

Thanks

Happy to help you

2 votesVote for this answer Mark as a Correct answer

bert limerkens answered on May 23, 2017 15:45

Hi Prashant,

That's my problem. I can't register it as a widget because it doesn't show up in my list of web parts.

Any thoughts about why it's not showing there?

0 votesVote for this answer Mark as a Correct answer

Prashant Verma answered on May 23, 2017 15:48 (last edited on May 23, 2017 15:51)

Hi Bert,

It seams like your webpart not registered properly into system. Make sure your webpart inherited with base class of CMSAbstractedWebpart.

0 votesVote for this answer Mark as a Correct answer

bert limerkens answered on May 23, 2017 15:54 (last edited on May 23, 2017 15:54)

I created one that inherits from the "Web Part Zone" webpart. So that should be ok?

0 votesVote for this answer Mark as a Correct answer

bert limerkens answered on May 23, 2017 16:00

Thanks Trevor, it is working now!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.