Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Widgets /

Discuss SilverStripe Widgets.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

WidgetAreaEditor not saving its instance ID on Page Type

Go to End

2 Posts   1868 Views


Community Member, 1 Post

14 May 2009 at 4:26pm

Currently have extended the WidgetArea to appear on other pages. I get the WidgetAreaEditor showing up in the CMS correctly, and newly placed widgets get saved to the correct WidgetArea.

However, the Page that contains this widget area (Sidebar) does not update with the correct WidgetArea ID (SidebarID) and instead remains with a value of 0. I've tried to force it using write, onBeforeWrite, and onAfterWrite, but I can't get it to work correctly. The closest I've gotten is to force every single Page to have the same widgetArea, which is not what I want or need.

Any help on associating the new widgetArea and its ID with the containing Page would be greatly appreciated!


Community Member, 57 Posts

15 May 2009 at 11:48am

Edited: 26/05/2009 2:43am

Not really sure I understand what you mean, better start off with some basics...

What version of SS are you running?
How have you extended the WidgetArea? Do you mean that you've modified a page to include a WidgetArea?
Can you post a picture showing what you mean, with the associated code?

I think that the WidgetAreaId will probably be the same for all pages of a given type. It will only be the widgets within it that change. So it may be that what you are experiencing is correct. What are you trying to do?

More questions than answers so far!