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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Widgets /

Discuss SilverStripe Widgets.

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

General Widget Question

Go to End

13 Posts   8108 Views


Community Member, 6 Posts

4 January 2009 at 4:37pm

Are widgets only for use with the blogs? The documentation makes it sound like widgets can only be used with the blogs. Is this correct? Is there any widget construct for using something like a widget on the home page? I have to show 3 posts from an RSS feed. I have the PHP code ready, but not sure how to integrate. Any help would be greatly appreciated.


Forum Moderator, 5523 Posts

4 January 2009 at 5:58pm

Currently by default only the blog makes use of widgets but there is no reason why they can't be used on other pages. See this page for more information


Community Member, 165 Posts

10 January 2009 at 8:42am

I have made it so my widgets can show up on all my pages. However I can't figure out how to make a global interface to manage the content in my widget. I don't want to have to go to every page and manually set up the widget since it should show the same info on each page. However I also want to be able to manage this from a gui and not the _config file. One widget I have is an advertising area where the site owner can select an image and type some text in as a description or link to more info etc. The way it seems to work is every page I add the widget to I have to link to the image and type the text in.

I have read some things on the forum about having a global settings area but it seems that the developers may not like this idea as it may be over designing. I think having a way for developers to add system wide settings is very important as I have many things I would like to put in such an interface that would make managing the site better for non-developer/programmer types.

Please consider again adding a way to manage global widgets with the ability to show or not show the global widget on page types.

Also I really would like to see widgets stored in a widgets folder at the root instead of having separate folders for each one at the root of the site.



Community Member, 712 Posts

10 January 2009 at 7:52pm

Edited: 10/01/2009 7:56pm

To make it appear on all pages you could create a special 'PageHolderPage' that all other pages are descendants of.

Ie, in your site tree, your site would look something like:

_+- PageHolder
___ +- Home
___ +- About
___ +- Stores
_____ +- Auckland
_____  +- Wellington
____ +- Contact

edit: GAH, why does the forum code block not respect whitespace? Impossible for format code nicely!!! Pretend that those underscores are spaces..

You apply the widget to the PageHolder page. Since all other pages are descendants of this one page, you can also access this 'global' widget (or whatever other data is held by PageHolder) with the appropriate tags.

This is a nice clean way to emulate a 'system wide' setting (or, really, just a root page setting) without adding new functionality.


Community Member, 712 Posts

10 January 2009 at 7:59pm

Edited: 10/01/2009 7:59pm

Note that this is exactly what happens in the blog - the BlogHolder object holds the widget, while the actual pages you see are BlogEntry objects. We're just extending the concept to cover the whole site :)


Community Member, 165 Posts

15 January 2009 at 10:56am

Ok, I see how that would work. What tag would cause the parent page widget to show up in the child pages?


Community Member, 26 Posts

18 January 2009 at 7:38am

i have found an error in the php-script which causes a width-problem

GoogleChartWidget.php Line 17 downwards:

"FrameWidth" => "Int"

is missing


Community Member, 57 Posts

24 November 2009 at 2:13pm

Hi Hamish,

I like your concept of the PageHolder page.

Do you have an example on this implementation. Or better still can a copy of this page be posted on this forum.

I am trying to make the Widgets available on every page type in SilverStripe 2.3.3 but the Widgets tab is only available in the Blog page type in the CMs.

My Skype ID is: ulyssesnz

Your help would be much appreciated.


Go to Top