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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Widgets /

Discuss SilverStripe Widgets.

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

More than one widget area?


Go to End


5 Posts   3538 Views

Avatar
moccasine

Community Member, 2 Posts

29 May 2009 at 11:31pm

Hi,

I'm pretty new to Silverstripe and it didn't take long for me to really really like it. For me one of the most important things with a CMS is the widgets, so my questions are:

1) Isn't it possible to have more than one widget area on one page? I have one to the right of the "main content" and one to the left, but both show the same widgets both public and in admin. Could I have made some misstake here or isn't this feature supported?

2) Can one page inherit a widget area from another page? What I would like, is to have the same area for a group of pages, when managing the widgets it would save a lot of time if I could arrange and setup the widgets once for all the pages in that group.

Many thanks!

Avatar
FungshuiElephant

Community Member, 57 Posts

3 June 2009 at 11:37am

1. The simple answer is no, you can't have more than one widget area on a page.

The long answer is sort of. The problem is caused by the way in which widgets are edited - there is an assumption built in to the admin system that each page will only have one widget area, adding another causes lots of problems. You can fake two widget areas on certain layouts by creating a widget that adds the necessary html markup to break your column of widgets into two columns and then use css to position them appropriately.

2. Again the simple answer is no; pagetypes can define widgetareas but not the widgets that are used within them - that info is stored in the db.

Possible solutions are: Run an SQL update query to make all the widgetareas have the same widgets as the master page.
Look at how the Random Content Widget accesses information from other pages, it should be possible to have a given page type look up the widgetarea information from another pagetype.

Avatar
moccasine

Community Member, 2 Posts

4 June 2009 at 4:38pm

Thanks for your reply!

I will take a look a bit more at this when I got more time and see if and how I can tweak things so I can setup multiple widget areas on the same page.

Avatar
Nivanka

Community Member, 400 Posts

25 July 2009 at 1:02pm

I have being talking about having two widget areas on page, it is not possible at all, but it will be a very useful feature if it is there as for columned website layouts we shall use it without any problem.

But for now we cant do that.

About the second question I would say know, but you can do that by creating a page and duplicating it, and then change the page type. It will work sometimes. But not a proper answer I know.

Avatar
joshy

Community Member, 57 Posts

2 August 2009 at 11:01pm

It's quite straightforward to inherit widgets. See my post here.

Josh