Jump to:

794 Posts in 409 Topics by 304 members

Widgets

SilverStripe Forums » Widgets » More than one widget area?

Discuss SilverStripe Widgets.

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

Page: 1
Go to End
Author Topic: 2606 Views
  • moccasine
    Avatar
    Community Member
    2 Posts

    More than one widget area? Link to this post

    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!

  • FungshuiElephant
    Avatar
    Community Member
    57 Posts

    Re: More than one widget area? Link to this post

    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.

  • moccasine
    Avatar
    Community Member
    2 Posts

    Re: More than one widget area? Link to this post

    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.

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: More than one widget area? Link to this post

    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.

  • joshy
    Avatar
    Community Member
    57 Posts

    Re: More than one widget area? Link to this post

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

    Josh

    2606 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.