Multiple Widget Zones

Jul 3, 2008 at 5:32 AM
Is it possible to have multiple widget zones? I am wanting to have one on my left side bar and one on my right side bar. I put the control in each area, but it appeared to not handle having to 2 zones on the page correctly.

Anyone have any ideas if this possible?
Jul 8, 2008 at 2:50 AM
Any ideas?
Jul 8, 2008 at 5:27 AM
I'm interested in this as well.  This would be particularly useful for having different sets of widgets depending on author or for having widgets on the left and right nav as joswalt pointed out.

Looking at the code however, it appears there is no support for this.  It looks like WidgetZone is hardcoded to use be_WIDGET_ZONE.xml, so there would have to be some way to set each zone to a different WIDGET_ZONE.xml.   It also looks like WidgetZone renders div id="widgetzone" which will be problematic if there are 2 of those on the page.

Any work arounds for getting widgets to appear in multiple locations on the page, or customizing a widget zone based on author?

Jul 20, 2008 at 3:38 PM
Edited Jul 20, 2008 at 4:11 PM
Me too would like support for this. As it stands now, I can't even use Recent posts, Recent comments etc out of widget zone, because there is no user control Recent posts, just a widget. Also implementation of widgets is a bit misplaced, few things are in the App_Code folder, some are in the Widgets folder.

I could even implement it myself if the owners of the project give some guidelines.

EDIT: Ok, I just took a closer look at these widgets implementation and I believe it should be "revamped", this is not the way it should be implemented..I just closed the About Me widget and its gone, completely, with the content and all.
Jul 21, 2008 at 8:03 PM
Edited Jul 22, 2008 at 3:56 AM
I too was annoyed with this limitation. I am working on refactoring the implementation of the widgets, separating logic from presentation, and allowing more than one widget zone. I'm kind of new to this project (and open source in general) how is the best way to share my implementation of this when it is demo-able?

Added: I don't think more than one be_WIDGET_ZONE.xml should be necessary. It would be better to just allow the the widget framework to have more than one drop/render zones. So you can freely move a widget from one zone to another with a simple drag of the mouse. Right now all the move/add/remove logic is implemented in adminwidget.aspx, I think it should be moved to a "WidgetManager" singleton.
Aug 20, 2008 at 9:45 AM
Edited Aug 20, 2008 at 9:46 AM
@markoh Practically all widgets that ships with BE.NET are simple wrappers around the old User controls in the App_Code and this is a good thing. It means that the controls are still there if you don't want to use widgets and at the same time the widgets are light weight.

@markoh "I just closed the About Me widget and its gone, completely, with the content and all" You did get a warning didn't you?

@joefateau I agree that there should only be one be_WIDGET_ZONE.xml with <widgetzones><widgetzone id=".."><widgets><widget id=".."> etc. The idea where you can move widgets between zones are cool and could be very nice.
Aug 20, 2008 at 4:36 PM
@rickardnilsson and whoever: I've worked on my idea and the only thing holding me up now is the javascript. I think I have to totally rewrite it. But, I want to use jQuery and I know Mads hates 3rd party libraries. I think I'm just going to go ahead with jQuery and if it is well received, then maybe Mads can make it not depend on jQuery
Aug 22, 2008 at 4:58 PM
I've developed a solution which enables multiple zones (but not moving between them) with only a fiew modifications to the current javascript. It worked out very well and didn't require that many changes.