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, biapar, Willr, Ingo, swaiba, simon_w

Are Widgets for Blogs Only?


Reply


5 Posts   1470 Views

Avatar
TotalNet

Community Member, 181 Posts

19 March 2009 at 4:33pm

I ask for two reasons:

1. the Wiki says: "Blog Widgets: A module can provide 1 or more blog-widget classes. See widgets for more information."
2. I cant get the YouTube widget to work and another user has posted that theirs [YouTube widget] works only in the blog

Have I just picked a widget that works with blogs only or does it apply to all widgets?

Cheers

Richard

Avatar
TotalNet

Community Member, 181 Posts

19 March 2009 at 4:36pm

Edited: 19/03/2009 4:37pm

Scrub that.

Just found this thread
http://www.silverstripe.org/widgets-2/show/251549

May I suggest that this is made a little clearer on the widgets download page.

Cheers,

Rich

Avatar
njw

Community Member, 7 Posts

21 March 2009 at 1:25am

Hi Rich

Many thanks for the link, but it doesn't seem to work for me. Have I missed something in the code? I am trying to implement the RandomContentWidget, but putting the code in the forum just gives me an error.

Many thanks for any help

Neil

Avatar
TotalNet

Community Member, 181 Posts

21 March 2009 at 11:20am

Edited: 21/03/2009 11:26am

Hi Neil,

Not sure why the link doesn't work for you, without it though I haven't exactly answered my own question for you.

The answer is yes and no.

Widgets are, by default, for Blog pages only. However, you can add them to other pages by including some code - which is a little beyond my understanding of SS right now, it's only been a week!

The relevant documentation is here:
http://doc.silverstripe.com/doku.php?id=widgets#adding_widgets_to_other_pages

The link that didn't work for you has a detailed discussion about implementing widgets across a range of pages, if the link still doesn't work try searching for "General Widget Question" which is the title of the topic.

hope that helps

Rich

Avatar
Nivanka

Community Member, 400 Posts

27 March 2009 at 2:47pm

Make sure you remove the WidgetAreaEditor from the blog page's getCMSField() function.