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

widgets only working for blogs?


Reply

5 Posts   1218 Views

Avatar
borriej

14 July 2010 at 1:02am Community Member, 267 Posts

Hi,

Do widgets only work for blogs?

I want to be able to embed a video trough the CMS, so I tought a widget would be handy.. but it is not working since i don't use a blog.

For images I always extend a page type like this:

....
   static $has_one = array(
      'PageMediaFoto' => 'Image',
   );
   
   function getCMSFields() {
      $fields = parent::getCMSFields();
      $fields->addFieldToTab("Root.Content.Afbeeldingen", new ImageField('PageMediaFoto'));
      return $fields;
   }

...

Is this also possible for a video?

Avatar
TotalNet

14 July 2010 at 9:25am Community Member, 181 Posts

First, check out:
http://doc.silverstripe.org/widgets#adding_widgets_to_other_pages

but you might also be interested in [url=http://doc.silverstripe.org/shortcodes]short codes[/url]

Avatar
SDH

27 July 2010 at 1:17pm Community Member, 10 Posts

Yes, in 2.4.x, it appears widgets only work for blogs.

I've spent 4 or 5 hours trying various permutations and combinations. No go. The widget tab appears in the CMS, I can add a widget to a page but I cannot make it appear. I did finally get rid of the double listing of widgets in the CMS for blog pages, evidently much more persistent than the docs make it appear due to a confusion between SideBar and Sidebar.

I would appreciate it if someone who is familiar with widgets and who has edit privileges in the docs, would pull a copy of 2.4.1 and try http://doc.silverstripe.org/widgets#adding_widgets_to_other_pages and update and correct it. It's wrong at the moment.

Avatar
greenemage

29 July 2010 at 2:29pm (Last edited: 29 July 2010 3:50pm), Community Member, 2 Posts

I couldn't get the tutorial to work on my 2.4 install either, but I found this module in the forums: [url]http://www.silverstripe.org/all-other-modules/show/274910#post274910[/url]

Once installed it was a little tricky to figure out how to set up the widgets and the CMS interface is slightly buggy, but works like a charm on the front end.

Avatar
SDH

29 July 2010 at 3:17pm Community Member, 10 Posts

That looks interesting, but I re-imaged my test machine yesterday and I'm back to playing with Drupal, which now looks much more stable and manageable than it did previously.

My take, for what it's worth: Silverstripe was noted as being 'most promising' in 2008. It's still promising, but hasn't moved beyond that. Too much is broken, mis-documented and/or mis-adapted for new versions. If you're willing to spend the time to become an expert, learn sapphire and the APIs, then it's probably fine -- possibly better than fine. If you're like me, a programmer with limited time trying to put together a freebie website for a nonprofit, it's just not gonna fly.