Widget tutorial

Nov 20, 2010 at 10:48 PM


Is there any good tutorial explaing the concepts around widgets and widget zones?
The documentation I´ve found so far doesn't explain it very good.


Nov 20, 2010 at 11:40 PM

I think the only thing we have in the Documentation area is here (in case you haven't seen it).  Maybe someone has something else.

Basically a widget zone is just a container that contains 0 or more widgets.  You can also have multiple widget zones since BE 1.6.  Most people have just one widget zone (with multiple widgets in it), but you can actually have multiple widget zones -- giving each widget zone a unique ZoneName.

Widgets are in the /widgets/ folder.  One folder for each widget.  Ex: /widgets/MonthList, /widgets/Search, /widgets/TextBox.

A widget always has a widget.ascx file.  This is what displays the widget.  It'll also often have widget.ascx.cs too, to store code in.  Most widgets (but not all) have an edit.ascx file.  This is what is displayed when you click the 'Edit' link next to a widget to configure the widget.  Similarly, if an edit.ascx exists, there will usually be an edit.ascx.cs file that contains the code.

Nov 21, 2010 at 7:56 AM
Edited Oct 24, 2011 at 9:24 PM

Here are some Links:










After these just do a search "BlogEngine Widgets"  and you will find other links.

Java Blog

Nov 21, 2010 at 8:14 AM



What I lack is an overall explaination how it all is tied (or glued) together.
Most of the samples out there are from older version of BE.NET that just doesn´t work in BE 1.6.
If I follow any of the samples, I get an exception (followed this tutorial) as soon as I click the edit button (complaining of some id) - I guess the widget has to be registered somehow?
There seem to be some magic to this widget thing that is not explained anywhere... 


Some questions:

  • How do I access the widget after it is created? 
  • How do I register a widget in a particular widget zone?
  • Where and how should widget data be stored?
  • Must a widget be in a widget zone? 
  • IS there any documentation showing how I can access e.g. profile data?

Lots of questions :)




Nov 21, 2010 at 8:27 AM


I found a great video tutorial by Mads Kristensen, think I´m up to speed now :)
Some questions still though...

  • Can I load just a single widget (i.e. not from loading a zone)?
    Pretty much related to my earlier question if a widget must be in a zone.
  • When I set IsEditable to return false, the edit button is displayed anyway
    Has anyone come across this before?
  • How is a zone defined?
    Where do I say: "this widget goes into that zone, and this little bugger goes into that"...?